#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  string s[n];
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  int row[n][m], col[n][m];
  int count = 0;
  memset(row, 0, sizeof(row));
  memset(col, 0, sizeof(col));
  for (int i = 0; i < n; i++) {
    if (s[i][0] == '.') {
      row[i][0] = 1;
      if (k == 1) {
        count++;
      }
    } else {
      row[i][0] = 0;
    }
  }
  for (int j = 0; j < m; j++) {
    if (s[0][j] == '.') {
      col[0][j] = 1;
      if (k == 1) count++;
    } else {
      col[0][j] = 0;
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 1; j < m; j++) {
      if (s[i][j] == '.') row[i][j] = row[i][j - 1] + 1;
      if (row[i][j] >= k) {
        count++;
      }
    }
  }
  for (int i = 1; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (s[i][j] == '.') col[i][j] = col[i - 1][j] + 1;
      if (col[i][j] >= k) {
        count++;
      }
    }
  }
  if (k != 1)
    cout << count << endl;
  else
    cout << count / 2 << endl;
  return 0;
}
