Cell removal#499

Cell removal

1 second
128 megabytes
Easy (≈1000)

From a rectangular sheet of paper (m rows, n columns) some cells are removed. In how many pieces the sheet will be fall apart? Two cells do not fall apart if they have a common side.

Input

The first row contains the numbers m and n (1 ≤ m, n ≤ 100). Each of the following m lines contains n symbols. If the cell is not cut, it is represented with the # sign, if it is cut, it is given with a point.

Output

Print the number of parts of the sheet.

Examples

Example 1

Loading
Loading