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