#include <bits/stdc++.h>
using namespace std;
char S[2009][2009];
int main() {
  int n, m, k, i, j, s, ans = 0;
  scanf("%d%d%d", &n, &m, &k);
  for (i = 0; i < n; ++i) {
    scanf("%s", S[i]);
    for (j = 0, s = 0; j < m; ++j) {
      if (S[i][j] == '.')
        ++s;
      else
        s = 0;
      if (s >= k) ++ans;
    }
  }
  for (j = 0; k > 1 && j < m; ++j)
    for (i = 0, s = 0; i < n; ++i) {
      if (S[i][j] == '.')
        ++s;
      else
        s = 0;
      if (s >= k) ++ans;
    }
  printf("%d\n", ans), exit(0);
}
