#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int rmove[4][2] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
char ch[5000][5000];
int main() {
  while (~scanf("%d%d%d", &n, &m, &k)) {
    for (int i = 0; i < n; i++) {
      scanf("%s", ch[i]);
    }
    int ans = 0;
    for (int i = 0; i < n; i++) {
      int co = 0;
      for (int j = 0; j < m; j++) {
        if (ch[i][j] == '.') co++;
        if (ch[i][j] == '*') co = 0;
        if (co >= k) {
          ans++;
        }
      }
    }
    if (k == 1) {
      cout << ans << endl;
      return 0;
    }
    for (int i = 0; i < m; i++) {
      int co = 0;
      for (int j = 0; j < n; j++) {
        if (ch[j][i] == '.') co++;
        if (ch[j][i] == '*') co = 0;
        if (co >= k) {
          ans++;
        }
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}
