#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2000;
const char LIBRE = '.';
const char BLOQUEADO = '*';
char mapa[MAXN + 2][MAXN + 2];
int arr[MAXN + 2];
int k;
int checa(int n) {
  int ret = 0;
  int c = 1, f;
  int sum = 0;
  for (f = 1; f <= k; f++) {
    sum += arr[f];
  }
  f = k;
  if (sum == 0) ret++;
  while (f < n) {
    sum -= arr[c++];
    sum += arr[++f];
    if (sum == 0) ret++;
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  cin >> k;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cin >> mapa[i][j];
    }
  }
  int resp = 0;
  if (k <= m) {
    for (int i = 1; i <= n; i++) {
      int c = 1;
      while (c <= m) {
        arr[c] = (mapa[i][c] == BLOQUEADO);
        c++;
      }
      resp += checa(m);
    }
  }
  if (k <= n) {
    for (int j = 1; j <= m; j++) {
      int c = 1;
      while (c <= n) {
        arr[c] = (mapa[c][j] == BLOQUEADO);
        c++;
      }
      resp += checa(n);
    }
  }
  if (k == 1) resp /= 2;
  cout << resp << "\n";
  return 0;
}
