#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int,int>;
#define rep(i,s,n) for(int i = s; i < (int)(n); i++)

int main() {
  int h,w,k,ans = 0;
  cin >> h >> w >> k;
  vector<string>data(h);
  rep(i,0,h) cin >> data[i];
  for (int x = 0; x < (1<<h); ++x){
    for (int y = 0; y < (1<<w); ++y){
      int c = 0;
      rep(i,0,h) rep(j,0,w) if(data[i][j] == '#' && x & (1<<i) && y & (1<<j)) c++;
      if(c == k) ans++;
    }
  }
  cout << ans << endl;
}