#include<bits/stdc++.h> using namespace std; string s[10005][10005]; int main(){ int n,h=0; for(int i=1;i<=n;i++){ cin>>s; } for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ if(s[i-1][j]!=x&&s[i+1][j]!=x&&s[i][j-1]!=x&&s[i][j+1]!=x&&s[i+1][j+1]!=x&&s[i-1][j-1]!=x){ h++; } } } cout<<h; return 0; }