#include <bits/stdc++.h>
using namespace std;
int maxim(int a, int b) { return (a > b) ? a : b; }
int maxim(int a, int b, int c) { return maxim(a, maxim(b, c)); }
int minim(int a, int b) { return (a < b) ? a : b; }
int minim(int a, int b, int c) { return minim(a, minim(b, c)); }
void print(int* arr, int length) {
  for (int i = 0; i < length; i++) {
    cout << arr[i] << " ";
  }
  cout << endl;
}
int getSum(int num) {
  int sum = 0;
  while (num != 0) {
    sum += num % 10;
    num /= 10;
  }
  return sum;
}
long long n, m, k;
double a, b;
int entry;
string str;
void run() {
  cin >> n >> m >> k;
  int room[n][m];
  int count = 0;
  for (int i = 0; i < n; i++) {
    cin >> str;
    for (int j = 0; j < m; j++) {
      if (str.at(j) == '*') {
        room[i][j] = 0;
      } else {
        room[i][j] = 1;
        count++;
      }
    }
  }
  if (k == 1) {
    cout << count << endl;
    return;
  }
  count = 0;
  for (int i = 0; i < n; i++) {
    int prev = room[i][0];
    int curr;
    for (int j = 1; j < m; j++) {
      curr = (prev + room[i][j]) * room[i][j];
      prev = curr;
      if (curr >= k) {
        count++;
      }
    }
  }
  for (int i = 0; i < m; i++) {
    int prev = room[0][i];
    int curr;
    for (int j = 1; j < n; j++) {
      curr = (prev + room[j][i]) * room[j][i];
      prev = curr;
      if (curr >= k) {
        count++;
      }
    }
  }
  cout << count << endl;
}
void setup() {
  ios_base::sync_with_stdio(false);
  cout.tie(NULL);
}
int main(void) {
  setup();
  int tests = 1;
  for (int i = 0; i < tests; i++) {
    run();
  }
  return 0;
}
