#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long n1, long long n2) {
  long long m;
  m = n1 * n2 / gcd(n1, n2);
  return m;
}
long long npr(long long n, long long r) {
  long long res = 1;
  for (long long i = n; i > n - r; i--) res *= i;
  return res;
}
long long ncr(long long n, long long r) {
  if (r > n) return 0;
  if (r * 2 > n) r = n - r;
  if (r == 0) return 1;
  long long res = n;
  for (long long i = 2; i <= r; i++) {
    res *= (n - i + 1);
    res /= i;
  }
  return res;
}
void dream() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
}
int Reverse(int val) {
  int rev = 0, rem;
  while (val != 0) {
    rem = val % 10;
    rev = rev * 10 + rem;
    val /= 10;
  }
  return rev;
}
bool prime(int n) {
  if (n == 1) return 0;
  for (int i = 2; i <= n / 2; ++i) {
    if (n % i == 0) {
      return 0;
    }
  }
  return 1;
}
template <typename T>
string to_str(T num) {
  stringstream stream;
  stream << num;
  return stream.str();
}
int to_int(string str) {
  int val;
  stringstream stream;
  stream << str;
  stream >> val;
  return val;
}
int func(string s) {
  int i = 0;
  int j = s.size() - 1;
  while (i < j) {
    if (s[i] != s[j]) return 0;
    i++;
    j--;
  }
  return 1;
}
long long bin_dec(string hh) {
  int j = 0;
  long long sum = 0;
  for (int i = hh.size() - 1; i >= 0; i--) {
    long long u = (hh[i] - '0');
    sum += (pow(2, j) * u);
    j++;
  }
  return sum;
}
int mini = INT_MIN;
long long cnt1 = 0, cnt2 = 0;
int M = 1000000007;
long long o, k = 0, h, g, cnt = 0, q, u, f, x, y, n, a, sum = 0, maxi = INT_MIN,
             t;
int arr[15] = {1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987};
int seen[2001][2001];
int main() {
  bool b = 0;
  string s;
  vector<string> v;
  cin >> h >> g >> a;
  for (int i = 0; i < h; i++) {
    cin >> s;
    v.push_back(s);
  }
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < g; j++) {
      if (v[i][j] == '.')
        cnt++;
      else {
        if (cnt >= a) {
          sum += ((cnt - a) + 1);
        }
        cnt = 0;
      }
    }
    if (cnt >= a) sum += ((cnt - a) + 1);
    cnt = 0;
  }
  if (a == 1) {
    return cout << sum, 0;
  }
  for (int i = 0; i < g; i++) {
    for (int j = 0; j < h; j++) {
      if (v[j][i] == '.')
        cnt++;
      else {
        if (cnt >= a) {
          sum += ((cnt - a) + 1);
        }
        cnt = 0;
      }
    }
    if (cnt >= a) sum += ((cnt - a) + 1);
    cnt = 0;
  }
  cout << sum << '\n';
}
