#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int temp = 0;
  long long ans = 0;
  char arr[n][2005];
  for (int i = 0; i < n; i++) {
    temp = 0;
    for (int j = 0; j < m; j++) {
      cin >> arr[i][j];
      if (arr[i][j] == '.')
        temp++;
      else {
        if (temp >= k) ans += (temp - k + 1);
        temp = 0;
      }
    }
    if (temp >= k) ans += (temp - k + 1);
  }
  if (k != 1) {
    for (int i = 0; i < m; i++) {
      temp = 0;
      for (int j = 0; j < n; j++) {
        if (arr[j][i] == '.')
          temp++;
        else {
          if (temp >= k) ans += (temp - k + 1);
          temp = 0;
        }
      }
      if (temp >= k) ans += (temp - k + 1);
    }
  }
  cout << ans;
}
