Farmer John's cows have finally launched from Earth and are now drifting through space aboard their Moocraft. They hope to reach their fellow cows on Io, one of Jupiter's moons, but to do so they must first pass through a dangerous asteroid belt.
Bessie is piloting the ship through a sector of space of size n \times n. The asteroids in this sector are composed of 1 \times 1 cells connected by their sides (cells that touch only at a corner are considered part of different asteroids). Help Bessie by counting the number of distinct asteroids in the entire sector.
Consider the 10 \times 10 sector shown on the left below. The characters "*" represent parts of asteroids, and each "." denotes empty space. The right-hand illustration shows an example numbering of the asteroids.
...**..... ...11.....
.*........ .2........
......*... ......3...
...*..*... ...3..3...
..*****... ..33333...
...*...... ...3......
....***... ....444...
.*..***... .5..444...
.....*...* .....4...6
..*....... ..7.......There are asteroids in this sector.
The first line contains the integer n~(1 \le n \le 1000). Starting from the second line, the (i + 1)-th line contains the -th row of the asteroid field, consisting of characters.
Print the number of asteroids in the field.
Example 1