#include <bits/stdc++.h>
using namespace std;
const int maxn = 10005;
string s[maxn];
int main() {
  int n, m, k, ans = 0;
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) cin >> s[i];
  if (k == 1) {
    int ans = 0;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++)
        if (s[i][j] == '.') ans++;
    }
    cout << ans << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m;) {
      if (s[i][j] == '*') j++;
      int sum = 0;
      while (s[i][j] == '.') {
        j++, sum++;
        if (sum == k) ans++;
        if (sum > k) ans++;
      }
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n;) {
      if (s[j][i] == '*') j++;
      int sum = 0;
      while (s[j][i] == '.') {
        j++, sum++;
        if (sum == k) ans++;
        if (sum > k) ans++;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
