#include <bits/stdc++.h>
using namespace std;
bool comp(pair<long long, long long> &a, pair<long long, long long> &b) {
  return (a.second > b.second);
}
void show_vec(vector<pair<long long, long long> > v) {
  for (int i = 0; i < v.size(); i++)
    cout << v[i].first << " " << v[i].second << "\n";
  ;
  cout << "\n";
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long lcm(long long a, long long b) { return ((a * b) / gcd(a, b)); }
void solve() {
  long long n, m, k;
  cin >> n >> m >> k;
  vector<string> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  long long cnt = 0, ans = 0;
  for (int i = 0; i < n; i++) {
    cnt = 0;
    for (int j = 0; j < m; j++) {
      if (v[i][j] == '.')
        cnt++;
      else
        cnt = 0;
      if (cnt >= k) ans++;
    }
  }
  if (k > 1) {
    for (int i = 0; i < m; i++) {
      cnt = 0;
      for (int j = 0; j < n; j++) {
        if (v[j][i] == '.')
          cnt++;
        else
          cnt = 0;
        if (cnt >= k) ans++;
      }
    }
  }
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
