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