#include <bits/stdc++.h>
using namespace std;
string ar[2005];
int main(void) {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) cin >> ar[i];
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    long long counter = 0;
    for (int j = 0; j < m; j++) {
      if (ar[i][j] == '.')
        counter++;
      else {
        if (counter >= k) ans += (counter - k + 1);
        counter = 0;
      }
    }
    if (counter >= k) ans += (counter - k + 1);
  }
  if (k > 1)
    for (int i = 0; i < m; i++) {
      long long counter = 0;
      for (int j = 0; j < n; j++) {
        if (ar[j][i] == '.')
          counter++;
        else {
          if (counter >= k) ans += (counter - k + 1);
          counter = 0;
        }
      }
      if (counter >= k) ans += (counter - k + 1);
    }
  cout << ans << endl;
  return 0;
}
