#hhkb2020b. [hhkb2020_b]Futon

[hhkb2020_b]Futon

Problem Statement

We have a grid with HH horizontal rows and WW vertical columns of squares, where each square is tidy or untidy.

You will now place a mattress on this grid.

The mattress can be placed on two horizontally or vertically adjacent tidy squares in the grid.

Given are integers HH, WW, and HH strings SiS_i of length WW each. If the jj-th character of SiS_i is ., the square at the ii-th row from the top and the jj-th column from the left is tidy; if the jj-th character of SiS_i is #, the square at the ii-th row from the top and the jj-th column from the left is untidy.

Find the number of ways to choose the position for the mattress.

Constraints

  • 2leqHleq1002 \\leq H \\leq 100
  • 2leqWleq1002 \\leq W \\leq 100
  • SiS_i is a string of length WW consisting of . and #.

Input

Input is given from Standard Input in the following format:

HH WW S1S_1 :: SHS_H

Output

Print the number of ways to choose the position for the mattress.


Sample Input 1

2 3
..#
#..

Sample Output 1

3

We have the following three choices:

  • the 11-st and 22-nd squares from the left in the 11-st row from the top;
  • the 22-nd and 33-rd squares from the left in the 22-nd row from the top; and
  • the 11-st and 22-nd squares from the top in the 22-nd column the left.

Sample Input 2

2 2
.#
#.

Sample Output 2

0