**Time limit:**1.00 s**Memory limit:**512 MB

**Input**

The first input line has two integers $n$ and $m$: the height and width of the map.

Then there are $n$ lines of $m$ characters describing the map. Each character is either

`.`

(floor) or `#`

(wall).**Output**

Print one integer: the number of rooms.

**Constraints**

- $1 \le n,m \le 1000$

**Example**

Input:

`5 8`

########

#..#...#

####.#.#

#..#...#

########

Output:

`3`