#include <bits/stdc++.h>
using namespace std;
const int N = 2000;
vector<vector<int> > g(N);
int n, m, k, t = 0, ans = 0;
char arr[N][N];
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> arr[i][j];
      if (arr[i][j] == '.') {
        t++;
      }
    }
  }
  if (k == 1) {
    ans = t;
  } else {
    t = 0;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        if (arr[i][j] == '.') {
          t++;
        }
        if (arr[i][j] == '*') {
          if (t >= k) {
            ans = ans + t - k + 1;
          }
          t = 0;
        }
      }
      if (t >= k) {
        ans = ans + t - k + 1;
      }
      t = 0;
    }
    t = 0;
    for (int j = 0; j < m; j++) {
      for (int i = 0; i < n; i++) {
        if (arr[i][j] == '.') {
          t++;
        }
        if (arr[i][j] == '*') {
          if (t >= k) {
            ans = ans + t - k + 1;
          }
          t = 0;
        }
      }
      if (t >= k) {
        ans = ans + t - k + 1;
      }
      t = 0;
    }
  }
  cout << ans;
  return 0;
}
