#include <bits/stdc++.h>
using namespace std;
int n = 0, m = 0, k = 0, g = 0, f = 0;
int main() {
  cin >> n >> m >> k;
  char a[n + 1][m + 1];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> a[i][j];
    }
  }
  for (int i = 0; i < n + 1; i++) {
    a[i][m] = '*';
  }
  for (int i = 0; i < m + 1; i++) {
    a[n][i] = '*';
  }
  for (int i = 0; i < n + 1; i++) {
    for (int j = 0; j < m + 1; j++) {
      if (a[i][j] == '.') {
        g += 1;
      }
      if (a[i][j] == '*') {
        if (g >= k) {
          f += g - k + 1;
        }
        g = 0;
      }
    }
    g = 0;
  }
  if (k != 1) {
    for (int i = 0; i < m + 1; i++) {
      for (int j = 0; j < n + 1; j++) {
        if (a[j][i] == '.') {
          g += 1;
        }
        if (a[j][i] == '*') {
          if (g >= k) {
            f += g - k + 1;
          }
          g = 0;
        }
      }
      g = 0;
    }
  }
  cout << f;
  return 0;
}
