#include <bits/stdc++.h>
using namespace std;
using namespace std;
const double EPS = 1e-9;
const int INF = 0x7f7f7f7f;
const double PI = acos(-1.0);
template <class T>
inline T gcd(T a, T b) {
  return (b) == 0 ? (a) : gcd((b), ((a) % (b)));
}
template <class T>
inline T lcm(T a, T b) {
  return ((a) / gcd((a), (b)) * (b));
}
template <typename T>
string NumberToString(T Number) {
  ostringstream second;
  second << Number;
  return second.str();
}
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m, k;
  while (cin >> n >> m >> k) {
    string st[n];
    for (int i = (int)(0); i <= (int)(n - 1); i++) {
      cin >> st[i];
    }
    long long sum = 0;
    for (int i = (int)(0); i <= (int)(n - 1); i++) {
      int cnt = 0;
      for (int j = (int)(0); j <= (int)(m - 1); j++) {
        if (st[i][j] == '*') {
          if (cnt >= k) sum += (cnt - k + 1);
          cnt = 0;
        } else
          cnt++;
      }
      if (cnt >= k) sum += (cnt - k + 1);
    }
    for (int i = (int)(0); i <= (int)(m - 1); i++) {
      int cnt = 0;
      for (int j = (int)(0); j <= (int)(n - 1); j++) {
        if (st[j][i] == '*') {
          if (cnt >= k) sum += (cnt - k + 1);
          cnt = 0;
        } else
          cnt++;
      }
      if (cnt >= k) sum += (cnt - k + 1);
    }
    if (k == 1) sum /= 2;
    cout << sum << endl;
  }
  return 0;
}
