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.
# coding=utf-8
#include<bits/stdc++.h>
using namespace std;
int n,m,b[55][55],s=0;
char a[55][55];
int main()
{
	cin>>n>>m;
	for(int i=0;i<n;i++) cin>>a[i];
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<m;j++)
		{
			if(a[i][j]=='f')  
				b[i][j]=1;
			else if (a[i][j]=='a') 
				b[i][j]=10;
			else if (a[i][j]=='c') 
				b[i][j]=100;
			else if (a[i][j]=='e') 
				b[i][j]=1000;
				
			if(i>=1&&j>=1)
			{
				if(b[i][j]+b[i][j-1]+b[i-1][j]+b[i-1][j-1]==1111)
					s++;
			}
		}
	}
	cout<<s;
    return 0;
 } 
	 				 	 		 	 		 		 	  						