#include <bits/stdc++.h>
using namespace std;
int main()
{
char mp[1001][1001];
int r,c,k,t,ans=0;
cin>>r>>c>>k;
for(int i=1;i<=r;i++)
for(int j=1;j<=c;j++)
cin>>mp[i][j];
for(int i=1;i<=r;i++)
for(int j=1;j<=c;j++)
if(mp[i][j]=='.')
{
t=0;
for(int g=i;g<i+k;g++)
if(mp[g][j]=='.')
t++;
if(t==k)
ans++;
t=0;
for(int g=j;g<j+k;g++)
if(mp[i][g]=='.')
t++;
if(t==k)
ans++;
}
cout<<ans;
return 0;
}