#include <bits/stdc++.h>
using namespace std;
void read() {}
template <class T, class... Arg>
void read(T &x, Arg &&...args) {
  cin >> x;
  read(args...);
}
void print_err() { cerr << "\n"; }
template <class T, class... Arg>
void print_err(T x, Arg &&...args) {
  cerr << x << " ";
  print_err(args...);
}
template <class T>
void print_container(T &cont) {
  for (auto iter : cont) {
    cerr << iter << " ";
  }
  cerr << "\n";
}
template <class T>
void print_container_pair(T &cont) {
  for (auto iter : cont) {
    cerr << iter.first << " " << iter.second << "\n";
  }
  cerr << "\n";
}
template <class T>
void print_container_map(T &cont) {
  for (auto iter : cont) {
    cerr << iter.first << " " << iter.second << "\n";
  }
  cerr << "\n";
}
template <class T>
void debug_arr(T arr, long long int st, long long int en) {
  for (long long int i = st; i < en; ++i) {
    cerr << arr[i] << " ";
  }
  cerr << endl;
}
template <class T>
void read_arr(T arr, long long int n) {
  for (long long int i = 0; i < n; ++i) {
    cin >> arr[i];
  }
}
template <class T>
void read_c(T &arr, long long int n) {
  for (long long int i = 0; i < n; ++i) {
    cin >> arr[i];
  }
}
void CP() {
  ios_base::sync_with_stdio(NULL);
  cin.tie(NULL);
  cout.tie(NULL);
  return;
}
char *stringTOCharArray(string str) {
  long long int n = str.length();
  char *ch = new char[n + 1];
  ;
  strcpy(ch, str.c_str());
  return ch;
}
string intostring(long long int n) { return to_string(n); }
long long int stringtoint(string str) { return stol(str); }
class Graph {
 public:
  list<long long int> *gph;
  long long int v;
  Graph(long long int v) {
    this->v = v;
    gph = new list<long long int>[v];
  }
  void add_edge(long long int u, long long int v, bool bidirectional = true) {
    gph[u].push_back(v);
    if (bidirectional) {
      gph[v].push_back(u);
    }
  }
};
void preprocessing() { return; }
const long long int d4i[4] = {-1, 0, 1, 0}, d4j[4] = {0, 1, 0, -1};
const long long int d8i[8] = {-1, -1, 0, 1, 1, 1, 0, -1},
                    d8j[8] = {0, 1, 1, 1, 0, -1, -1, -1};
void solve(long long int faltu) {
  long long int n, m, k;
  read(n, m, k);
  long long int arr[n][m];
  char ch;
  for (long long int i = 0; i < n; ++i) {
    for (long long int j = 0; j < m; ++j) {
      read(ch);
      if (ch == '*') {
        arr[i][j] = 1;
      } else {
        arr[i][j] = 0;
      }
    }
  }
  long long int ans = 0, count = 0;
  for (long long int i = 0; i < n; ++i) {
    count = 0;
    for (long long int j = 0; j < m; ++j) {
      if (arr[i][j] == 1) {
        if (count >= k) {
          ans += (count - k + 1);
        }
        count = 0;
      } else {
        count++;
      }
    }
    if (count >= k) {
      ans += (count - k + 1);
    }
  }
  count = 0;
  if ((n != 1 or m != 1) and k != 1) {
    for (long long int i = 0; i < m; ++i) {
      count = 0;
      for (long long int j = 0; j < n; ++j) {
        if (arr[j][i] == 1) {
          if (count >= k) {
            ans += (count - k + 1);
          }
          count = 0;
        } else {
          count++;
        }
      }
      if (count >= k) {
        ans += (count - k + 1);
      }
    }
  }
  cout << ans;
  return;
}
int32_t main() {
  CP();
  long long int i = 1;
  preprocessing();
  solve(i);
  return 0;
}
