Grid and phrase#11608

Grid and phrase

1 second
128 megabytes
Easy

You are given an n \cdot m grid which contains lowercase English letters. How many times does the phrase saba appear horizontally, vertically, and diagonally in the grid?

The following word locations in the matrix are possible:

\includegraphics{https://eolympusercontent.com/images/7rujhg8vfh6bh0pdp8lupt0b90.gif}

Input

The first line contains the number of rows and the number of columns (1 \leq n, m \leq 100) in the grid. Each of the next lines contains a string of length with lowercase English letters only.

Output

Print the number of times the word saba appears in the grid.

Examples

Example 1

Loading
Loading