9 Round Spiral. Round 1. Step 9.
Rectangular garden of width n and length m is divided into squares of side 1. At this place the beds are dug up. Beds is a collection of squares, satisfying the following conditions:
- Out of every square of the bed its possible to access any other square of the same bed, successively moving along the bed from square to square through their common side;
- Any two beds do not intersect and do not touch each other either vertically or horizontally sides of the squares (the angle's contact of the beds squares is allowed).
Count the number of beds at the garden plot.
First line contains numbers n and m (1 ≤ n, m ≤ 200). It is followed by n lines of m characters. The # symbol denotes the territory of beds, the point corresponds to free territory. There is no any other character in the input.
Print the number of beds at the garden plot.
5 10 ##......#. .#..#...#. .###....#. ..##....#. ........#.