#include <bits/stdc++.h>
using namespace std;
int getSum(int n) {
  int sum = 0;
  while (n != 0) {
    sum = sum + n % 10;
    n = n / 10;
  }
  return sum;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m, k;
  cin >> n >> m >> k;
  long long ans = 0;
  string arr[2200];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  for (int i = 0; i < n; i++) {
    int ctr = 0;
    for (int j = 0; j <= m; j++) {
      if (arr[i][j] == '*' || j == m) {
        if (ctr >= k) {
          ans += (ctr - k + 1);
        }
        ctr = 0;
      } else
        ctr++;
    }
  }
  if (k != 1) {
    for (int i = 0; i < m; i++) {
      int ctr = 0;
      for (int j = 0; j <= n; j++) {
        if (arr[j][i] == '*' || j == n) {
          if (ctr >= k) {
            ans += (ctr - k + 1);
          }
          ctr = 0;
        } else
          ctr++;
      }
    }
  }
  cout << ans;
}
