#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n, m, k;
  cin >> n >> m >> k;
  long long res = 0;
  vector<vector<char> > f(n, vector<char>(m));
  for (long long i = 0; i < n; i++)
    for (long long j = 0; j < m; j++) cin >> f[i][j];
  for (long long i = 0; i < n; i++) {
    long long cnt = 0;
    for (long long j = 0; j < m; j++) {
      char ch = f[i][j];
      if (ch == '*') cnt = 0;
      if (ch == '.') cnt++;
      if (cnt >= k) res++;
    }
  }
  if (k != 1) {
    for (long long i = 0; i < m; i++) {
      char pred = ' ';
      long long cnt = 0;
      for (long long j = 0; j < n; j++) {
        char ch = f[j][i];
        if (ch == '*') cnt = 0;
        if (ch == '.') cnt++;
        if (cnt >= k) res++;
      }
    }
  }
  cout << res;
}
