The developers of Looksery have to write an efficient algorithm that detects faces on a picture. Unfortunately, they are currently busy preparing a contest for you, so you will have to do it for them. 

In this problem an image is a rectangular table that consists of lowercase Latin letters. A face on the image is a 2 × 2 square, such that from the four letters of this square you can make word "face". 

You need to write a program that determines the number of faces on the image. The squares that correspond to the faces can overlap.
The first line contains two space-separated integers, *n* and *m* (1 ≤ *n*, *m* ≤ 50) — the height and the width of the image, respectively.

Next *n* lines define the image. Each line contains *m* lowercase Latin letters.
def check_face(start, m, cols, rows):
    i = (start)//cols
    j = start - cols*i
    if i != rows-1 and j != cols - 1:
        square = [m[i*cols+j], m[i*cols+j+1], m[i*cols+j+cols], m[i*cols+j+cols+1]]
        if 'f' in square and 'a' in square and 'c' in square and 'e' in square:
            return 1
    return 0

rows, cols = [int(i) for i in input().split()]
m = [0 for i in range(rows*cols)]
for i in range(rows):
    row = input()
    for j in range(len(row)):
        m[i*cols + j] = row[j]

count = 0
for start in range(len(m)):
    count += check_face(start, m, cols, rows)
print(count)
	  			 		 	 	  								 				 	