#include <bits/stdc++.h>
using namespace std;
const int MAX = 2000 + 20;
int row, column;
int num;
char mar[MAX][MAX];
int height[MAX][MAX];
int width[MAX][MAX];
void Init() {
  memset(height, 0, sizeof(height));
  memset(width, 0, sizeof(width));
}
int Solve() {
  int count = 0;
  for (int i = 1; i <= row; i++) {
    for (int k = 1; k <= column; k++) {
      if (mar[i][k] == '.') {
        height[i][k] = height[i - 1][k] + 1;
        width[i][k] = width[i][k - 1] + 1;
        if (height[i][k] >= num) count++;
        if (width[i][k] >= num) count++;
      }
    }
  }
  if (num == 1) return count / 2;
  return count;
}
int main(int argc, char *argv[]) {
  while (cin >> row >> column >> num) {
    Init();
    for (int i = 1; i <= row; i++) {
      getchar();
      for (int k = 1; k <= column; k++) {
        scanf("%c", &mar[i][k]);
      }
    }
    int res = Solve();
    printf("%d\n", res);
  }
  return 0;
}
