#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1.0);
int fx[] = {0, 0, 1, -1, 1, 1, -1, -1};
int fy[] = {1, -1, 0, 0, 1, -1, 1, -1};
int SET(int n, int pos) { return n = n | (1 << pos); }
int RESET(int n, int pos) { return n = n & ~(1 << pos); }
int CHECK(int n, int pos) { return (bool)(n & (1 << pos)); }
int bigMod(int n, int power, int MOD) {
  if (power == 0) return 1;
  if (power % 2 == 0) {
    int ret = bigMod(n, power / 2, MOD);
    return ((ret % MOD) * (ret % MOD)) % MOD;
  } else
    return ((n % MOD) * (bigMod(n, power - 1, MOD) % MOD)) % MOD;
}
int modInverse(int n, int MOD) { return bigMod(n, MOD - 2, MOD); }
int POW(int x, int y) {
  int res = 1;
  for (; y;) {
    if ((y & 1)) {
      res *= x;
    }
    x *= x;
    y >>= 1;
  }
  return res;
}
int inverse(int x) {
  double p = ((double)1.0) / x;
  return (p) + 1e-9;
}
int gcd(int a, int b) {
  while (b) b ^= a ^= b ^= a %= b;
  return a;
}
int nC2(int n) { return n * (n - 1) / 2; }
int MOD(int n, int mod) {
  if (n >= 0)
    return n % mod;
  else if (-n == mod)
    return 0;
  else
    return mod + (n % mod);
}
char ara[2005][2005];
int vis[2005][2005][4];
int n, m, k;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> k;
  int xx, yy;
  int dumb = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> ara[i][j];
      if (ara[i][j] == '.') {
        xx = i;
        yy = j;
        dumb++;
      }
    }
  }
  int res = 0, cnt = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (ara[i][j] == '.') {
        cnt++;
      }
      if (ara[i][j] == '*' || j == m - 1) {
        if (cnt >= k) {
          res += cnt - k + 1;
        }
        cnt = 0;
      }
    }
  }
  cnt = 0;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      if (ara[j][i] == '.') {
        cnt++;
      }
      if (ara[j][i] == '*' || j == n - 1) {
        if (cnt >= k) {
          res += cnt - k + 1;
        }
        cnt = 0;
      }
    }
  }
  if (k == 1) {
    cout << dumb << "\n";
  } else
    cout << res << "\n";
  return 0;
}
