#include <bits/stdc++.h>
using namespace std;
int sod(int x) {
  int sum = 0;
  while (x) {
    sum += x % 10;
    x /= 10;
  }
  return sum;
}
void solve() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<string> v(n);
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    v[i] = s;
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    int cnt = 0;
    for (int j = 0; j < m; j++) {
      if (v[i][j] == '.') {
        cnt++;
      } else {
        if (cnt >= k) ans += (cnt - k + 1);
        cnt = 0;
      }
    }
    if (cnt >= k) ans += cnt - k + 1;
  }
  if (k != 1) {
    for (int i = 0; i < m; i++) {
      int cnt = 0;
      for (int j = 0; j < n; j++) {
        if (v[j][i] == '.') {
          cnt++;
        } else {
          if (cnt >= k) ans += (cnt - k + 1);
          cnt = 0;
        }
      }
      if (cnt >= k) ans += cnt - k + 1;
    }
  }
  cout << ans << "\n";
}
int main() {
  cin.tie(0);
  cout.tie(0);
  cin.sync_with_stdio(0);
  cout.sync_with_stdio(0);
  int TC = 1;
  for (int ZZ = 1; ZZ <= TC; ZZ++) {
    clock_t start = clock();
    cout.precision(10);
    cout << fixed << '\n';
    solve();
    clock_t end = clock();
    cerr << "Time: " << (double)(end - start) / CLOCKS_PER_SEC << " seconds"
         << '\n';
  }
  return 0;
}
