#include <bits/stdc++.h>
using namespace std;
const int maxn = 2005;
int n, m, k, row[maxn][maxn], col[maxn][maxn];
char ch;
int main() {
  ios::sync_with_stdio(false);
  while (cin >> n >> m >> k) {
    memset(row, 0, sizeof(row));
    memset(col, 0, sizeof(col));
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) {
        cin >> ch;
        if (ch == '*') {
          row[i][j]++;
          col[i][j]++;
        }
      }
    }
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) {
        row[i][j] += row[i][j - 1];
      }
    }
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) {
        col[i][j] += col[i - 1][j];
      }
    }
    int ans = 0;
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= m; j++) {
        if (j - k >= 0 && row[i][j - k] == row[i][j]) {
          ans++;
        }
        if (i - k >= 0 && col[i - k][j] == col[i][j]) {
          ans++;
        }
      }
    }
    cout << (k == 1 ? ans / 2 : ans) << endl;
  }
  return 0;
}
