#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  char arr[2005][2005];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) cin >> arr[i][j];
  }
  long long int count = 0;
  long long int ans = 0;
  for (int i = 0; i < n; i++) {
    long long int c = 0;
    for (int j = 0; j < m; j++) {
      if (arr[i][j] == '.') c++;
      if (arr[i][j] == '*') c = 0;
      if (c >= k) ans++;
    }
  }
  for (int j = 0; j < m; j++) {
    long long int c = 0;
    for (int i = 0; i < n; i++) {
      if (arr[i][j] == '.') c++;
      if (arr[i][j] == '*') c = 0;
      if (c >= k) ans++;
    }
  }
  if (k == 1) {
    ans = ans / 2;
  }
  cout << ans;
  return 0;
}
