#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e3 + 5;
int n, m, k, r[maxn][maxn], c[maxn][maxn], res = 0;
char x;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cin >> x;
      if (x == '*')
        r[i][j] = c[i][j] = 0;
      else
        r[i][j] = r[i - 1][j] + 1, c[i][j] = c[i][j - 1] + 1;
      if (r[i][j] >= k) res++;
      if (c[i][j] >= k) res++;
    }
  }
  if (k == 1) res /= 2;
  cout << res;
  return 0;
}
