#include <bits/stdc++.h>
using namespace std;
int t[3000][3000];
int main() {
  ios_base ::sync_with_stdio(false);
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      char a;
      cin >> a;
      if (a != '.') {
        t[i][j] = 1;
      }
    }
  }
  int ans = 0;
  for (int q = 1; q <= m; q++) {
    int value = 0;
    int l = 1;
    int r = k;
    if (r > n) continue;
    for (int q1 = 1; q1 <= min(r, n); q1++) {
      value += t[q1][q];
    }
    if (value == 0) {
      ans++;
    }
    while (r < n) {
      r++;
      value += t[r][q];
      value -= t[l][q];
      l++;
      if (value == 0) ans++;
    }
  }
  for (int q = 1; q <= n; q++) {
    int value = 0;
    int l = 1;
    int r = k;
    if (k > m) continue;
    for (int q1 = 1; q1 <= min(r, m); q1++) {
      value += t[q][q1];
    }
    if (value == 0) {
      ans++;
    }
    while (r < m) {
      r++;
      value += t[q][r];
      value -= t[q][l];
      l++;
      if (value == 0) ans++;
    }
  }
  if (k == 1) {
    cout << ans / 2;
    return 0;
  }
  cout << ans;
  return 0;
}
