#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)

using namespace std;
using ll = long long;
using P = pair<int, int>;

template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}

template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}

template <typename Iterator>
inline bool next_combination(const Iterator first, Iterator k, const Iterator last) {
  /* Credits: Thomas Draper */
  if ((first == last) || (first == k) || (last == k)) return false;
  Iterator itr1 = first;
  Iterator itr2 = last;
  ++itr1;
  if (last == itr1) return false;
  itr1 = last;
  --itr1;
  itr1 = k;
  --itr2;
  while (first != itr1) {
    if (*--itr1 < *itr2) {
      Iterator j = k;
      while (!(*itr1 < *j)) ++j;
      std::iter_swap(itr1, j);
      ++itr1;
      ++j;
      itr2 = k;
      std::rotate(itr1, j, last);
      while (last != j) {
        ++j;
        ++itr2;
      }
      std::rotate(k, itr2, last);
      return true;
    }
  }
  std::rotate(first, k, last);
  return false;
}

int main() {
  int h, w, k;
  cin >> h >> w >> k;
  char c[h][w];
  rep(i, h) rep(j, w) cin >> c[i][j];

  std::string s_line = "";
  for (int i = 0; i < h; i++) s_line += to_string(i);
  std::string s_col = "";
  for (int i = 0; i < w; i++) s_col += to_string(i);

  int result = 0;

  int cnt = 0;
  rep(i, h) {
    rep(j, w) {
      if (c[i][j] == '#') cnt++;
    }
  }
  if (cnt == k) result++;

  for (int line = 1; line <= h; line++) {
    do {
      string lineC(s_line.begin(), s_line.begin() + line);
      for (int col = 1; col <= w; col++) {
        do {
          string colC(s_col.begin(), s_col.begin() + col);

          char temp[h][w];
          rep(i, h) rep(j, w) temp[i][j] = c[i][j];

          vector<int> lines;
          vector<int> cols;

          // cout << lineC << " " << colC << endl;

          for (int i = 0; i < lineC.length(); i++) {
            lines.push_back(lineC[i] - '0');
          }
          for (int i = 0; i < colC.length(); i++) {
            cols.push_back(colC[i] - '0');
          }
          for (int no : lines) {
            for (int col = 0; col < w; col++) {
              temp[no][col] = '.';
            }
          }
          for (int no : cols) {
            for (int line = 0; line < h; line++) {
              temp[line][no] = '.';
            }
          }
          int cnt = 0;
          rep(i, h) {
            rep(j, w) {
              if (temp[i][j] == '#') cnt++;
            }
          }
          if (cnt == k) {
            // cout << "result add: " << lineC << " " << colC << endl;
            result++;
          }

        } while (next_combination(s_col.begin(), s_col.begin() + col, s_col.end()));
      }

    } while (next_combination(s_line.begin(), s_line.begin() + line, s_line.end()));
  }

  for (int col = 1; col <= w; col++) {
    do {
      string colC(s_col.begin(), s_col.begin() + col);

      char temp[h][w];
      rep(i, h) rep(j, w) temp[i][j] = c[i][j];

      vector<int> cols;
      for (int i = 0; i < colC.length(); i++) {
        cols.push_back(colC[i] - '0');
      }
      for (int no : cols) {
        for (int line = 0; line < h; line++) {
          temp[line][no] = '.';
        }
      }
      int cnt = 0;
      rep(i, h) {
        rep(j, w) {
          if (temp[i][j] == '#') cnt++;
        }
      }
      if (cnt == k) {
        // cout << "result add: " << colC << endl;
        result++;
      }

    } while (next_combination(s_col.begin(), s_col.begin() + col, s_col.end()));
  }

  for (int line = 1; line <= h; line++) {
    do {
      string lineC(s_line.begin(), s_line.begin() + line);

      char temp[h][w];
      rep(i, h) rep(j, w) temp[i][j] = c[i][j];

      vector<int> lines;

      for (int i = 0; i < lineC.length(); i++) {
        lines.push_back(lineC[i] - '0');
      }
      for (int no : lines) {
        for (int col = 0; col < w; col++) {
          temp[no][col] = '.';
        }
      }
      int cnt = 0;
      rep(i, h) {
        rep(j, w) {
          if (temp[i][j] == '#') cnt++;
        }
      }
      if (cnt == k) {
        // cout << "result add: " << lineC << endl;
        result++;
      }
    } while (next_combination(s_line.begin(), s_line.begin() + line, s_line.end()));
  }

  cout << result << endl;
  return 0;
}

Measured memory_bytes: 3624