#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> A(0);
  long long int n, m, k, i, j, cnt, sum;
  string s;
  cin >> n >> m >> k;
  const long long int N = n;
  const long long int M = m;
  char seats[N][M];
  for (i = 0; i < n; i++) {
    cin >> s;
    for (j = 0; j < m; j++) seats[i][j] = s[j];
  }
  for (i = 0; i < n; i++) {
    cnt = 0;
    for (j = 0; j < m; j++) {
      if (seats[i][j] == '.')
        cnt++;
      else {
        if (cnt >= k) A.push_back(cnt);
        cnt = 0;
      }
    }
    if (cnt >= k) A.push_back(cnt);
  }
  if (k > 1)
    for (j = 0; j < m; j++) {
      cnt = 0;
      for (i = 0; i < n; i++) {
        if (seats[i][j] == '.')
          cnt++;
        else {
          if (cnt >= k) A.push_back(cnt);
          cnt = 0;
        }
      }
      if (cnt >= k) A.push_back(cnt);
    }
  sum = 0;
  for (i = 0; i < A.size(); i++) {
    sum += A[i] - k + 1;
  }
  cout << sum;
  return 0;
}
