#include <bits/stdc++.h>
using namespace std;
char s[2005][2005];
int dp[2][2005][2005];
int main() {
  int n, m, k;
  int ans = 0;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; i++) scanf("%s", s[i] + 1);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      if (s[i][j] == '.') {
        dp[0][i][j] = dp[0][i - 1][j] + 1;
        dp[1][i][j] = dp[1][i][j - 1] + 1;
      }
      if (dp[0][i][j] >= k) ans++;
      if (dp[1][i][j] >= k && k > 1) ans++;
    }
  printf("%d\n", ans);
  return 0;
}
