#include <bits/stdc++.h>
using namespace std;
int mp[2005][2005];
int n, m, k;
int main() {
  int sum1[2005], sum2[2005];
  int ans = 0;
  cin >> n >> m >> k;
  memset(sum2, 0, sizeof(sum2));
  for (int i = 0; i < n; i++) {
    sum1[i] = 0;
    for (int j = 0; j < m; j++) {
      char x;
      cin >> x;
      if (x == '.') {
        sum2[j]++;
        sum1[i]++;
      } else {
        sum2[j] = 0;
        sum1[i] = 0;
      }
      if (sum1[i] >= k) {
        ans++;
      }
      if (sum2[j] >= k && k != 1) {
        ans++;
      }
    }
  }
  cout << ans << endl;
}
