Shower cabin
Stepan has purchased a shower cabin and plans to install it in his country house. The house is shaped like a rectangle with dimensions N x M, divided into unit squares. The shower cabin takes up exactly two adjacent squares that share a side. Some squares in the house are already occupied by various items.
Your task is to help Stepan figure out how many different ways he can place the shower cabin in the house.
Input Format:
The first line of input contains two integers N and M (1 ≤ N, M ≤ 1000), representing the dimensions of Stepan's country house. Each of the next N lines contains M characters, describing the layout of the house. A "#" symbol indicates a square that is already occupied, while a "." symbol indicates a free square that can be used for the shower cabin.
Output Format:
Output a single integer, which is the number of ways to place the shower cabin in the country house.