#include <bits/stdc++.h>
using namespace std;
int r[2002][2002];
int c[2002][2002];
int main() {
  int n, m, k, sum = 0;
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      r[i][j] = 0;
      c[i][j] = 0;
      char ch;
      cin >> ch;
      if (ch == '.') {
        r[i][j] = r[i - 1][j] + 1;
        c[i][j] = c[i][j - 1] + 1;
        if (r[i][j] >= k) sum++;
        if (c[i][j] >= k) sum++;
      }
    }
  }
  if (k == 1) {
    cout << sum / 2;
  } else {
    cout << sum;
  }
}
