#include <bits/stdc++.h>
int main() {
  int n, m, k;
  scanf("%d", &n);
  ;
  scanf("%d", &m);
  ;
  scanf("%d", &k);
  ;
  getchar();
  char s[2001][2001];
  int i, j;
  for (i = 0; i < n; i++) gets(s[i]);
  long long int count = 0, temp = 0;
  for (i = 0; i < n; i++) {
    temp = 0;
    for (j = 0; j < m; j++) {
      if (s[i][j] == '*') temp = 0;
      if (s[i][j] == '.') temp++;
      if (temp >= k) count++;
    }
  }
  if (k == 1) {
    printf("%lld", count);
    return 0;
  }
  for (i = 0; i < m; i++) {
    temp = 0;
    for (j = 0; j < n; j++) {
      if (s[j][i] == '*') temp = 0;
      if (s[j][i] == '.') temp++;
      if (temp >= k) count++;
    }
  }
  printf("%lld", count);
}
