#include <bits/stdc++.h>
using namespace std;
int n, m, k, a[2005][2005], ans, p;
int main() {
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      char c;
      c = getchar();
      while (c != '.' && c != '*') c = getchar();
      a[i][j] = c;
      if (c == '.') p++;
    }
  if (k == 1) {
    cout << p;
    return 0;
  }
  int x = 0;
  for (int i = 1; i <= n; i++) {
    x = 0;
    for (int j = 1; j <= m; j++) {
      if (a[i][j] == a[i][j - 1] && a[i][j] == '.')
        x++;
      else if (a[i][j] == '.')
        x = 1;
      else {
        if (x >= k) ans += x - k + 1;
        x = 0;
      }
    }
    if (x >= k) ans += x - k + 1;
  }
  for (int j = 1; j <= m; j++) {
    x = 0;
    for (int i = 1; i <= n; i++) {
      if (a[i][j] == a[i - 1][j] && a[i][j] == '.')
        x++;
      else if (a[i][j] == '.')
        x = 1;
      else {
        if (x >= k) ans += x - k + 1;
        x = 0;
      }
    }
    if (x >= k) ans += x - k + 1;
  }
  cout << endl << ans;
}
