시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 512 MB 49 41 40 83.333%

문제

While playing in his favourite text editor, Daniel decided to draw a picture that was N characters high and M characters wide. The picture consists solely of characters ’.’ and ’*’ such that characters ’*’ form some non-overlapping rectangles. The rectangles don’t even touch each other on their sides or corners.

Help Daniel count the number of rectangles drawn on the picture.

입력

The first line contains two integers N and M (1 ≤ N, M ≤ 100) from task description. Each of the next N lines contains M characters ’.’ or ’*’ which represent the picture that Daniel drew.

출력

In a single line you should output the number of rectangles on the picture.

예제 입력 1

6 7
***....
***..**
.....**
.***.**
.***...
.***...

예제 출력 1

3

예제 입력 2

3 3
*.*
...
*.*

예제 출력 2

4

예제 입력 3

1 10
.*.**.***.

예제 출력 3

3