#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  vector<string> seats;
  int n, m, k;
  cin >> n >> m >> k;
  seats.reserve(n);
  for (size_t i = 0; i < n; ++i) {
    string s;
    cin >> s;
    seats.push_back(s);
  }
  long long number_ways = 0;
  for (size_t i = 0; i < n; ++i) {
    if (m < k) {
      break;
    }
    bool works = false;
    for (size_t l = 0; l < m - k + 1; ++l) {
      if (works) {
        if (seats[i][l + k - 1] == '.') {
          works = true;
        } else {
          works = false;
        }
      }
      if (!works) {
        works = true;
        for (size_t j = 0; j < k; ++j) {
          if (seats[i][l + j] != '.') {
            works = false;
            break;
          }
        }
      }
      if (works) {
        ++number_ways;
      }
    }
  }
  for (size_t i = 0; i < m; ++i) {
    if (n < k) {
      break;
    }
    bool works = false;
    for (size_t l = 0; l < n - k + 1; ++l) {
      if (works) {
        if (seats[l + k - 1][i] == '.') {
          works = true;
        } else {
          works = false;
        }
      }
      if (!works) {
        works = true;
        for (size_t j = 0; j < k; ++j) {
          if (seats[j + l][i] != '.') {
            works = false;
            break;
          }
        }
      }
      if (works) {
        ++number_ways;
      }
    }
  }
  if (k == 1) {
    number_ways /= 2;
  }
  cout << number_ways << endl;
  return 0;
}
