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 detect_face(mat, k):
    new_arr = []

    for i in range(k):
        new_arr.extend(mat[i])

    for i in 'face':
        if i not in new_arr:
            return False
        
    return True

def face_detection(arr, rows, cols):
    k = 2

    temp_mat = [[0 for _ in range(k)] for _ in range(k)]
    count_faces = 0

    for i in range(rows - k+1):
        for j in range(cols - k+1):
            x = 0
            y = 0
            for a in range(i, i + k):
                y = 0
                for b in range(j, j + k):
                    temp_mat[x][y] = arr[a][b]
                    y += 1
                x += 1
            if (detect_face(temp_mat, 2)):
                count_faces += 1
    
    print(count_faces)

def solve():
    rows, cols = [int(x) for x in input().split()]
    
    if rows < 2 or cols < 2:
        print(0)
        return
    
    arr = []
    for i in range(rows):
        arr.extend([[*x] for x in input().split()])
    
    face_detection(arr, rows, cols)
    
solve()