#include <bits/stdc++.h>
using namespace std;
void display(vector<vector<char> > &v) {
  for (int i = 0; i < v.size(); i++) {
    for (int j = 0; j < v[0].size(); j++) cout << v[i][j] << " ";
    cout << endl;
  }
}
void display(vector<vector<long long> > v) {
  for (int i = 0; i < v.size(); i++) {
    for (int j = 0; j < v[0].size(); j++) cout << v[i][j] << " ";
    cout << endl;
  }
}
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<vector<char> > v(n + 1, vector<char>(m + 1));
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) cin >> v[i][j];
  vector<vector<long long> > va(n + 1, vector<long long>(m + 1));
  vector<vector<long long> > vd(n + 1, vector<long long>(m + 1));
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (v[i][j] == '.') va[i][j] = va[i][j - 1] + 1;
    }
  }
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= n; j++) {
      if (v[j][i] == '.') vd[j][i] = vd[j - 1][i] + 1;
    }
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (va[i][j] >= k) ans++;
      if (vd[i][j] >= k && k != 1) ans++;
    }
  }
  cout << ans << endl;
}
