A patch of night sky is a grid of R rows and C columns. Each cell is either a star (*) or empty (.). Two stars belong to the same constellation cluster if one can be reached from the other by repeatedly stepping to a star in any of the eight surrounding cells (horizontally, vertically, or diagonally adjacent).
Count the number of distinct constellation clusters.
Input format
Line 1: two integers R and C.
Next R lines: a string of exactly C characters each, using * for a star and . for empty sky.
Output format
A single integer: the number of constellation clusters.
Constraints
- 1 <= R, C <= 1000
- Every grid character is
*or..