#include <bits/stdc++.h>
using namespace std;
const long long maxN = 4000;
long long n, m, k, ans;
char a[maxN][maxN];
long long check1(long long r) {
  long long f = 0;
  long long ret = 0;
  for (long long i = 0; i < m; i++) {
    if (a[r][i] == '.')
      f++;
    else if (a[r][i] == '*') {
      if (f >= k) {
        ret += f - k + 1;
      }
      f = 0;
    }
  }
  if (f >= k) {
    ret += f - k + 1;
    f = 0;
  }
  return ret;
}
long long check2(long long c) {
  long long f = 0;
  long long ret = 0;
  for (long long i = 0; i < n; i++) {
    if (a[i][c] == '.')
      f++;
    else if (a[i][c] == '*') {
      if (f >= k) {
        ret += f - k + 1;
      }
      f = 0;
    }
  }
  if (f >= k) {
    ret += f - k + 1;
    f = 0;
  }
  return ret;
}
int32_t main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m >> k;
  long long ch = 0;
  for (long long i = 0; i < n; i++) {
    string s;
    cin >> s;
    for (long long j = 0; j < m; j++) {
      a[i][j] = s[j];
      if (s[j] == '.') ch++;
    }
  }
  if (k == 1) {
    cout << ch;
    return 0;
  }
  for (long long i = 0; i < n; i++) {
    ans += check1(i);
  }
  for (long long i = 0; i < m; i++) {
    ans += check2(i);
  }
  cout << ans << endl;
  return 0;
}
