#include <bits/stdc++.h>
using namespace std;
int vis[2005];
int main() {
  int n, m, k;
  char c;
  scanf("%d%d%d", &n, &m, &k);
  int ans = 0;
  for (int i = 0; i < n; i++) {
    getchar();
    int temp = 0;
    for (int j = 0; j < m; j++) {
      scanf("%c", &c);
      if (c == '.') {
        vis[j]++;
        temp++;
      } else {
        vis[j] = 0;
        temp = 0;
      }
      if (temp >= k) ans++;
      if (vis[j] >= k && k != 1) ans++;
    }
  }
  printf("%d\n", ans);
  return 0;
}
