COCI '19 Contest 5 #1 Emacs
View as PDFWhile playing in his favourite text editor, Daniel decided to draw a picture that was  characters high and
 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.
Input
The first line contains two integers  and 
 
 from task description.
Each of the next  lines contains 
 characters 
. or * which represent the picture that Daniel drew.
Output
In a single line you should output the number of rectangles on the picture.
Scoring
In the test cases worth a total of  of the points, all rectangles will consist of a single 
* character.
In the test cases worth additional  of the points, it will hold 
.
Sample Input 1
6 7
***....
***..**
.....**
.***.**
.***...
.***...
Sample Output 1
3
Sample Input 2
3 3
*.*
...
*.*
Sample Output 2
4
Sample Input 3
1 10
.*.**.***.
Sample Output 3
3
Comments