#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n, k;
  cin >> m >> n >> k;
  vector<vector<bool>> seats(m, vector<bool>(n, false));
  vector<vector<bool>> checkCol(m, vector<bool>(n, false));
  vector<vector<bool>> checkRow(m, vector<bool>(n, false));
  int total = 0;
  cin.get();
  for (int i = 0; i < m; ++i) {
    string s;
    getline(cin, s);
    for (int j = 0; j < n; ++j) {
      if (s[j] == '*')
        seats[i][j] = false;
      else
        seats[i][j] = true;
    }
  }
  for (int i = 0; i < m; ++i) {
    for (int j = 0; j < n; ++j) {
      if (!checkRow[i][j] && seats[i][j]) {
        int count = 1;
        for (int jj = j; jj < n; ++jj) {
          if (!seats[i][jj]) break;
          if (count >= k) {
            total++;
          }
          checkRow[i][jj] = true;
          count++;
        }
      }
      if (!checkCol[i][j] && (k != 1) && seats[i][j]) {
        int count = 1;
        for (int ii = i; ii < m; ++ii) {
          if (!seats[ii][j]) break;
          if (count >= k) {
            total++;
          }
          checkCol[ii][j] = true;
          count++;
        }
      }
    }
  }
  cout << total << endl;
  return 0;
}
