#include <bits/stdc++.h>
using namespace std;
pair<pair<int, int>, pair<int, int> > r[111];
vector<int> dx;
char a[1111][1111];
int n, m, k;
int main() {
  gets(a[0]);
  sscanf(a[0], "%d%d%d", &n, &m, &k);
  k = 0;
  for (int(i) = 0; (i) < (n); ++(i)) gets(a[i]);
  for (int(i) = 0; (i) < (n); ++(i))
    for (int(j) = 0; (j) < (m); ++(j))
      if (a[i][j] == '*') {
        int ii = i, jj = j;
        while (a[i][jj] == '*') ++jj;
        while (a[ii][j] == '*') ++ii;
        r[k++] = make_pair(make_pair(i, --ii), make_pair(j, --jj));
        dx.push_back(i);
        dx.push_back(ii);
        for (int t = i; t <= ii; ++t)
          for (int tt = j; tt <= jj; ++tt) a[t][tt] = '.';
      }
  dx.push_back(0);
  sort((dx).begin(), (dx).end());
  dx.resize(unique((dx).begin(), (dx).end()) - dx.begin());
  long long ans = 0;
  for (int st = 0; st < (int)dx.size(); ++st)
    for (int fn = st; fn < (int)dx.size(); ++fn) {
      int si = dx[st];
      int fi = dx[fn];
      vector<pair<int, int> > dy;
      for (int(i) = 0; (i) < (k); ++(i))
        if ((r[i].first.first >= si && r[i].first.first <= fi) ||
            (r[i].first.second >= si && r[i].first.second <= fi) ||
            (r[i].first.first <= si && r[i].first.second >= fi)) {
          if (r[i].first.first >= si && r[i].first.second <= fi) {
            dy.push_back(make_pair(r[i].second.first, -1));
            dy.push_back(make_pair(r[i].second.second, 1));
          } else {
            dy.push_back(make_pair(r[i].second.first, -100));
            dy.push_back(make_pair(r[i].second.second, +100));
          }
        }
      dy.push_back(make_pair(0, 0));
      sort((dy).begin(), (dy).end());
      for (int num = 1; num <= 3; ++num) {
        int j = 0;
        int glo = 0;
        int cglo = 0;
        int bi = 0;
        int bj = 0;
        for (int i = 0; i < (int)dy.size(); ++i) {
          while (j < (int)dy.size() && !(cglo - glo >= num && bj == 0)) {
            if (dy[j].second > 0) cglo += dy[j].second;
            bj += dy[j++].second;
          }
          if (cglo - glo == num && bj == 0 && bi == 0) {
            int m1, m2, m3, m4;
            if (!st)
              m1 = 1;
            else
              m1 = si - dx[st - 1];
            if (!i)
              m3 = 1;
            else
              m3 = (dy[i].first - dy[i - 1].first);
            if (fn < (int)dx.size() - 1)
              m2 = dx[fn + 1] - fi;
            else
              m2 = n - fi;
            if (j == (int)dy.size())
              m4 = m - dy.back().first;
            else
              m4 = dy[j].first - dy[j - 1].first;
            ans += (long long)m1 * m2 * m3 * m4;
          }
          if (dy[i].second > 0) glo += dy[i].second;
          bi += dy[i].second;
        }
      }
    }
  cout << ans << endl;
}
