Hyunwoo has a hobby of making various shapes by pouring plaster into a mold and letting it harden. The mold he prepared this time is a rectangular parallelepiped with height $R$, width $C$, and depth $1$.
If the resulting shape is too simple, making plaster models is less fun. So Hyunwoo brought $R \times C$ cylinders with diameter and height $1$. He plans to place all the cylinders inside the mold and then pour plaster into the empty spaces.
When placing the cylinders in the mold, the mold is divided into $R \times C$ unit cubes, and each cylinder must fit exactly into one unit cube. There are three possible orientations for a cylinder: its axis can be horizontal (along the width direction), vertical (along the height direction), or perpendicular to the floor.
After Hyunwoo places all the cylinders, he will pour plaster into the mold, let it harden, and then remove all the cylinders. This produces several separate plaster pieces. For example, if two cylinders are placed with their axes perpendicular to the floor in a rectangular mold with height $1$ and width $2$, a total of $6$ plaster pieces are created.
On the other hand, if the orientation of one cylinder is changed so that its axis is vertical (along the height direction) in the same example, a total of $5$ plaster pieces are created.
Given the arrangement of cylinders in the mold, determine the total number of plaster pieces that will be produced.
Input
The first line contains two integers $R$ and $C$ representing the height and width of the mold, respectively, separated by a space. ($1 \le R, C \le 200$)
The next $R$ lines describe how Hyunwoo places the cylinders in the mold. Each line contains a string of length $C$, and the characters have the following meanings:
H: a cylinder whose axis is horizontal (along the width direction)I: a cylinder whose axis is vertical (along the height direction)O: a cylinder whose axis is perpendicular to the floor
Output
Output the number of plaster pieces that are created after the plaster hardens and all cylinders are removed.
Examples
Input 1
1 2 OO
Output 1
6
Input 2
1 2 OI
Output 2
5
Input 3
1 2 OH
Output 3
4
Input 4
2 2 IH HI
Output 4
2