#include <bits/stdc++.h>
using namespace std;
const int N = 2001;
const int mod = (int)1e9 + 7;
string s[N];
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  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++) {
    for (int j = 0, pos = 0; j < m; j++) {
      if (s[i][j] == '*')
        pos = j + 1;
      else
        ans += ((j - pos + 1) >= k);
    }
  }
  if (k > 1)
    for (int i = 0; i < m; i++) {
      for (int j = 0, pos = 0; j < n; j++) {
        if (s[j][i] == '*')
          pos = j + 1;
        else
          ans += ((j - pos + 1) >= k);
      }
    }
  cout << ans;
  return 0;
}
