#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n, m, k, cnt = 0, temp = 0;
  cin >> n >> m >> k;
  char classroom[n][m];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> classroom[i][j];
    }
  }
  if (k != 1) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        if (classroom[i][j] == '*') {
          if (((temp - k) + 1) > 0) cnt += ((temp - k) + 1);
          temp = 0;
        } else {
          temp++;
        }
        if (j == m - 1)
          if (((temp - k) + 1) > 0) cnt += ((temp - k) + 1);
      }
      temp = 0;
    }
    for (int j = 0; j < m; j++) {
      for (int i = 0; i < n; i++) {
        if (classroom[i][j] == '*') {
          if (((temp - k) + 1) > 0) cnt += ((temp - k) + 1);
          temp = 0;
        } else {
          temp++;
        }
        if (i == n - 1)
          if (((temp - k) + 1) > 0) cnt += ((temp - k) + 1);
      }
      temp = 0;
    }
  } else {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        if (classroom[i][j] == '.') {
          cnt++;
        }
      }
    }
  }
  cout << cnt;
  return 0;
}
