#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, cnt = 0, cnt1 = 0;
  cin >> n >> m >> k;
  char arr[n][m];
  vector<int> v;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> arr[i][j];
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (arr[i][j] == '.') cnt1++;
      if (arr[i][j] == arr[i][j + 1] && arr[i][j] == '.' && j != m - 1) {
        cnt++;
      } else {
        v.push_back(cnt + 1);
        cnt = 0;
      }
    }
    if (cnt > 0) v.push_back(cnt + 1);
    cnt = 0;
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n - 1; j++) {
      if (arr[j][i] == arr[j + 1][i] && arr[j][i] == '.') {
        cnt++;
      } else {
        v.push_back(cnt + 1);
        cnt = 0;
      }
    }
    if (cnt > 0) v.push_back(cnt + 1);
    cnt = 0;
  }
  int sum = 0;
  if (k != 1) {
    for (int i = 0; i < v.size(); i++) {
      if (v[i] >= k) {
        sum += v[i] - k + 1;
      }
    }
    cout << sum << endl;
  } else {
    cout << cnt1 << endl;
  }
  return 0;
}
