Олимпиадный тренинг

Задача 38830. Cell Removal


Задача

Темы: Обход в ширину

Some cells have been removed from a rectangular sheet of checkered paper (M rows, N columns). How many pieces will the rest of the sheet break up into? Two cells do not fall apart if they have a common side.


Input

The first line contains the numbers M and N, the following M lines contain N characters. If the cell has not been cut out, this corresponds to the # sign, if it is cut out - a dot. 1 <= M, N <= 100.


Output

Output one number.
 

Examples
# Input Output
1
5 10
##..#####.
.#.#.#....
###..##.#.
..##.....#
.###.#####
5