#include <bits/stdc++.h>
using namespace std;
char a[3000][3000];
int n, m, k;
int solve();
int com(int n, int r);
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < n; i++) {
    scanf("%s", a[i]);
  }
  int ans = solve();
  if (k == 1) ans /= 2;
  printf("%d\n", ans);
  return 0;
}
int solve() {
  int ans = 0;
  for (int i = 0; i < n; i++) {
    int cnt = 0;
    for (int j = 0; j < m; j++) {
      if (a[i][j] == '*') {
        if (cnt < k) {
          cnt = 0;
        } else {
          ans += cnt - k + 1;
          cnt = 0;
        }
        continue;
      }
      if (a[i][j] == '.') cnt++;
      if (j == m - 1 && cnt >= k) {
        ans += cnt - k + 1;
        cnt = 0;
      }
    }
  }
  for (int i = 0; i < m; i++) {
    int cnt = 0;
    for (int j = 0; j < n; j++) {
      if (a[j][i] == '*') {
        if (cnt >= k) {
          ans += cnt - k + 1;
        }
        cnt = 0;
        continue;
      }
      if (a[j][i] == '.') cnt++;
      if (j == n - 1 && cnt >= k) {
        ans += cnt - k + 1;
        continue;
      }
    }
  }
  return ans;
}
int com(int n, int r) {
  if (n - r > r) r = n - r;
  int i, j, s = 1;
  for (i = 0, j = 1; i < r; i++) {
    s *= (n - i);
    for (; j <= r && s % j == 0; j++) s /= j;
  }
  return s;
}
