// Problem: P3654 First Step (ファーストステップ)
// Contest: Luogu
// URL: https://www.luogu.com.cn/problem/P3654
// Memory Limit: 125 MB
// Time Limit: 1000 ms
// User: Pannnn
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int r, c, k;
cin >> r >> c >> k;
char info[110][110] = { 0 };
for (int i = 1; i <= r; ++i) {
for (int j = 1; j <= c; ++j) {
cin >> info[i][j];
}
}
// 以每个点为起始,判断其向右,向下是否能站立
int cnt = 0;
for (int i = 1; i <= r; ++i) {
for (int j = 1; j <= c; ++j) {
bool flag = true;
for (int m = 0; m < k; ++m) {
if (info[i][j + m] != '.') {
flag = false;
break;
}
}
if (flag) {
++cnt;
} else {
flag = true;
}
/*
注意当k为1时,向右向下会重复
*/
if (k == 1) {
continue;
}
for (int m = 0; m < k; ++m) {
if (info[i + m][j] != '.') {
flag = false;
break;
}
}
if (flag) {
++cnt;
}
}
}
cout << cnt << endl;
return 0;
}