#include <bits/stdc++.h>
using namespace std;
struct $ {
  $() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
  }
} $;
const int N = 2005;
char s[N][N];
int dp1[N][N], dp2[N][N];
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) {
    cin >> s[i] + 1;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (s[i][j] == '*') {
        dp1[i][j] = 0;
        dp2[i][j] = 0;
      } else {
        dp1[i][j] = dp1[i][j - 1] + 1;
        dp2[i][j] = dp2[i - 1][j] + 1;
      }
    }
  }
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      ans += dp1[i][j] >= k;
      if (k != 1) ans += dp2[i][j] >= k;
    }
  }
  cout << ans << endl;
  return 0;
}
