L. Online Preliminary
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Siri is participating in the online preliminary round of the China Collegiate Programming Contest.

After finishing the sign-in problem, she went to the restroom. When she came back, she found that a character matrix had inexplicably appeared in the editor.

This character matrix has $$$n$$$ rows, each of length $$$m$$$, and consists only of lowercase letters.

She plans to choose two consecutive rows and two consecutive columns. The intersection of these two rows and two columns will form a $$$2\times 2$$$ submatrix.

She wants to know how many submatrices $$$A$$$ satisfying the above conditions satisfy $$$A = \begin{bmatrix} \text{c} & \text{c}\\ \text{p} & \text{c} \end{bmatrix}$$$.

Input

The first line contains two positive integers $$$n,m$$$ ($$$2\le n, m \le 500$$$), indicating the size of the matrix.

The next $$$n$$$ lines each contain a string of length $$$m$$$, representing the character matrix. The data is guaranteed to contain only lowercase letters.

Output

Output a single integer on one line, representing the answer.

Example
Input
3 4
cccc
spcc
ccpc
Output
2