Angle
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
A rectangular board of size M×N is provided, with some cells removed. Determine the number of ways to position a "corner" consisting of three cells such that all three cells are within the board and none are removed.
Input
The first line of the input contains two integers, M and N (1 ≤ M, N ≤ 100), separated by a space. The following M lines each contain N characters. The j-th character of the i-th line is 'X' if the cell is removed, and '.' if it is not.
Output
Output a single integer representing the number of ways to place a corner on the board.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 1K
Acceptance rate 41%