#include<bits/stdc++.h>
using namespace std;
const int dx[10]={-1,1,0,0};
const int dy[10]={0,0,-1,1};
char c[105][105]={};
int r,C,k;
int check(int x,int y){
int cnt=0;
for(int i=0;i<4;i++){
int x1=x,y1=y;
bool o=1;
for(int j=1;j<k;j++){
int xx=x1+dx[i],yy=y1+dy[i];
if(c[xx][yy]!='.'){
o=0;
break;
}else{
x1=xx;
y1=yy;
}
}
if(o){
cnt++;
}
}
return cnt;
}
int main(){
int ans=0;
cin>>r>>C>>k;
for(int i=1;i<=r;i++){
for(int j=1;j<=C;j++){
cin>>c[i][j];
}
}
for(int i=1;i<=r;i++){
for(int j=1;j<=C;j++){
if(c[i][j]=='.'){
ans+=check(i,j);
c[i][j]='#';
}
}
}
cout<<ans;
return 0;
}
#4#5WA
在线等,急!