#include <bits/stdc++.h>
using namespace std;
template <class T>
void pv(vector<T> &vec) {
  for (int i = 0; i < (int)(vec).size(); i++)
    cout << vec[i] << (i == (int)(vec).size() - 1 ? '\n' : ' ');
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int R, C, k;
  cin >> R >> C >> k;
  vector<vector<char> > grid(R);
  for (int i = 0; i < R; i++) {
    grid[i].resize(C);
    for (int j = 0; j < C; j++) cin >> grid[i][j];
  }
  vector<int> rows, cols;
  char last;
  int len;
  for (int i = 0; i < R; i++) {
    last = '*';
    len = 0;
    for (int j = 0; j < C; j++) {
      if (grid[i][j] == '.')
        len++;
      else if (last == '.') {
        rows.push_back(len);
        len = 0;
      }
      last = grid[i][j];
    }
    if (len > 0) rows.push_back(len);
  }
  for (int j = 0; j < C; j++) {
    last = '*';
    len = 0;
    for (int i = 0; i < R; i++) {
      if (grid[i][j] == '.')
        len++;
      else if (last == '.') {
        cols.push_back(len);
        len = 0;
      }
      last = grid[i][j];
    }
    if (len > 0) cols.push_back(len);
  }
  long long ans = 0;
  for (int i = 0; i < (int)(rows).size(); i++) ans += max(0, rows[i] - k + 1);
  if (k > 1) {
    for (int i = 0; i < (int)(cols).size(); i++) ans += max(0, cols[i] - k + 1);
  }
  cout << ans << '\n';
  return 0;
}
