#include<bits/stdc++.h>
using namespace std;
using UL = unsigned int;
using ULL = unsigned long long;
using LL = long long;
#define rep(i,n) for(UL i=0; i<(n); i++)

int main() {
 UL H,W,K; cin>>H>>W>>K;
 UL G[6][6];
 rep(y,H) rep(x,W){
  char c; cin>>c;
  G[x][y]=(c=='#'?1:0);
 }
 UL ans=0;
 rep(X,(1<<W)) rep(Y,(1<<H)){
  UL k=0;
  rep(x,W) rep(y,H){
   if(X & (1<<x)) if(Y & (1<<y)) k+=G[x][y];
  }
  if(k==K) ans++;
 }
 cout<<ans<<endl;
 return 0;
}

