#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int ans = 0;
  char a[n][m];
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      cin >> a[i][j];
    }
  }
  for (int i = 0; i < n; ++i) {
    int l = 0;
    for (int j = 0; j < m; ++j) {
      if (a[i][j] == '.') {
        ++l;
      }
      if (a[i][j] != '.' || j == m - 1) {
        if (l >= k) {
          ans += l - k + 1;
        }
        l = 0;
      }
    }
  }
  for (int j = 0; j < m; ++j) {
    int l = 0;
    for (int i = 0; i < n; ++i) {
      if (a[i][j] == '.') {
        ++l;
      }
      if (a[i][j] != '.' || i == n - 1) {
        if (l >= k) {
          ans += l - k + 1;
        }
        l = 0;
      }
    }
  }
  if (k == 1) {
    ans /= 2;
  }
  cout << ans;
  return 0;
}
