#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<string> s(n);
  long long int ans = 0, ans1 = 0;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    long long int cnt = 0, cs = 0;
    for (int j = 0; j < m; j++) {
      if (s[i][j] == '.') {
        cnt++;
        if (cnt >= k) cs++;
      } else {
        cnt = 0;
      }
    }
    ans += cs;
  }
  if (k == 1) {
    cout << ans;
    return 0;
  }
  for (int i = 0; i < m; i++) {
    long long int cnt = 0, cs = 0;
    for (int j = 0; j < n; j++) {
      if (s[j][i] == '.') {
        cnt++;
        if (cnt >= k) cs++;
      } else {
        cnt = 0;
      }
    }
    ans1 += cs;
  }
  ans += ans1;
  cout << ans;
}
