#include<stdio.h>
#define MAX_SIZE 100
int main()
{
int R, C, K;
scanf("%d %d %d",&R, &C, &K);
int a[MAX_SIZE+1][MAX_SIZE+1];
char ch;
for(int i = 0; i < R; i++){
for(int j = 0; j < C; j++){
scanf(" %c",&ch);
a[i][j] = (ch == '.') ? 1 : 0;
}
}
int ans = 0;
for (int i = 0; i < R; i++) {
int cnt = 0;
for (int j = 0; j < C; j++) {
if (a[i][j]) {
cnt++;
} else {
cnt = 0;
}
if (cnt == K) {
ans++;
cnt--;
}
}
}
for (int j = 0; j < C; j++) {
int cnt = 0;
for (int i = 0; i < R; i++) {
if (a[i][j]) {
cnt++;
} else {
cnt = 0;
}
if (cnt == K) {
ans++;
cnt--;
}
}
}
printf("%d",ans);
return 0;
}