#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
int n, m, k, cnt, cur;
char c[2001][2001];
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) cin >> c[i][j];
  if (k == 1) {
    for (int i = 0; i < n; i++)
      for (int j = 0; j < m; j++)
        if (c[i][j] == '.') cnt++;
    cout << cnt;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    cur = 0;
    for (int j = 0; j < m; j++) {
      if (c[i][j] == '.') {
        cur++;
        if (cur >= k) cnt++;
      } else {
        cur = 0;
      }
    }
  }
  for (int i = 0; i < m; i++) {
    cur = 0;
    for (int j = 0; j < n; j++) {
      if (c[j][i] == '.') {
        cur++;
        if (cur >= k) cnt++;
      } else {
        cur = 0;
      }
    }
  }
  cout << cnt;
  return 0;
}
