#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m, k;
  cin >> n >> m >> k;
  vvi cr(n + 1, vi(m + 1, 0));
  for (int i = 0; i < n; ++i) {
    string l;
    cin >> l;
    for (int j = 0; j < m; ++j) {
      if (l[j] == '*') {
        cr[i][j] = 1;
      }
    }
    cr[i][m] = 1;
  }
  for (int j = 0; j <= m; ++j) {
    cr[n][j] = 1;
  }
  int poss = 0;
  for (int i = 0; i < n; ++i) {
    int cons = 0;
    for (int j = 0; j <= m; ++j) {
      if (cr[i][j] == 0)
        ++cons;
      else {
        poss += max(0, cons - k + 1);
        cons = 0;
      }
    }
  }
  if (k > 1) {
    for (int j = 0; j < m; ++j) {
      int cons = 0;
      for (int i = 0; i <= n; ++i) {
        if (cr[i][j] == 0)
          ++cons;
        else {
          poss += max(0, cons - k + 1);
          cons = 0;
        }
      }
    }
  }
  cout << poss << endl;
}
