#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int rw[2003][2003], cl[2003][2003];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m, k;
  cin >> n >> m >> k;
  int c1 = 0;
  vector<vector<char> > T(2003, vector<char>(2003));
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cin >> T[i][j];
      if (T[i][j] == '.') c1++;
    }
  }
  if (k == 1) {
    cout << c1 << endl;
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (T[i][j] == '.')
        rw[i][j] = rw[i][j - 1] + 1;
      else
        rw[i][j] = 0;
    }
  }
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= n; j++) {
      if (T[j][i] == '.')
        cl[j][i] = cl[j - 1][i] + 1;
      else
        cl[j][i] = 0;
    }
  }
  long long cnt = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (rw[i][j] > rw[i][j - 1] && rw[i][j] >= k) cnt++;
    }
  }
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= n; j++) {
      if (cl[j][i] > cl[j - 1][i] && cl[j][i] >= k) cnt++;
    }
  }
  cout << cnt << endl;
  return 0;
}
