#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
const int N = 3e5 + 10;
const int MAX = 1e9 + 1;
int n, m, k;
char mp[2100][2100];
int main() {
  int i, j;
  cin >> n >> m >> k;
  for (i = 0; i < n; ++i) cin >> mp[i];
  int ans = 0;
  for (i = 0; i < n; ++i) {
    int conseDot = 0;
    for (j = 0; j < m; ++j) {
      if (mp[i][j] == '*') {
        ans += max(0, conseDot - k + 1);
        conseDot = 0;
      } else {
        ++conseDot;
      }
    }
    ans += max(0, conseDot - k + 1);
  }
  for (i = 0; i < m; ++i) {
    int conseDot = 0;
    for (j = 0; j < n; ++j) {
      if (mp[j][i] == '*') {
        ans += max(0, conseDot - k + 1);
        conseDot = 0;
      } else {
        ++conseDot;
      }
    }
    ans += max(0, conseDot - k + 1);
  }
  cout << (k == 1 ? ans / 2 : ans) << endl;
  return 0;
}
