//is there any case of -1 or any special corner cases ?
#include<bits/stdc++.h>
using namespace std;
#define int long long int 
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define vi vector<int>
#define pi pair<int,int>
#define all(v) v.begin(),v.end()
#define zeros(arr) memset(arr,0,sizeof(arr));
#define precise(num)  cout<<fixed; cout << std::setprecision(num)
#define nl cout<<"\n";
#define test int t;cin>>t;while(t--) 
const int maxx  = 3*1e5 , limit = 9*1e18 , MOD=1e9+7;

string binary(int n){bitset<60>b(n) ;string p =b.to_string();return p;}

int decimal(string n) { int dec_value = 0;  int base = 1;  for (int i = n.size() - 1; i >= 0; i--) { if (n[i] == '1') 
dec_value += base; base = base * 2; } return dec_value; } 

bool isPrime(int n){if (n <= 1) return false; if (n <= 3) return true;if (n % 2 == 0 || n % 3 == 0) return false;

for (int i = 5; i * i <= n; i = i + 6) if (n % i == 0 || n % (i + 2) == 0) return false; return true; }

int pow (int x, int n,int mod) {if (n == 0) return 1; int res = pow (x, n / 2,mod);res = (res * res) % mod;if (n % 2) res = (res * x ) % mod;return res;}
// int calcInverse(int a, int n = MOD){int t = 0, newt = 1;int r = n, newr = a;  while (newr != 0) {auto quotient = r /newr;tie(t, newt) = make_tuple(newt, t- quotient * newt);
// tie(r, newr) = make_tuple(newr, r - quotient * newr);}if (r > 1)throw runtime_error("a is not invertible");if (t < 0)t += n;t=t%n;    return t;}

#define boost  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define endl '\n';

int32_t main(){
    
    
    int n,m,K;
    cin>>n>>m>>K;
    char arr[n+1][m+1];
    int tot  = 0; 
    for(int i = 0; i <  n; i ++ ){
        
        string s;
        cin>>s;
        for(int j =0 ; j  < s.size() ; j ++ ){
            arr[i][j]=s[j];
            if(s[j] == '#')tot++;
        }
        
    }
    int res= 0 ;
    
    int tot1 = pow(2,n);
    int tot2 = pow(2,m);
    for(int i =0 ; i < tot1 ; i++ ){
        
        for(int j =0 ; j < tot2 ; j++ ){
            
                string str1 = binary(i);
                string str2 = binary(j);
                vector<int>i1;
                vector<int>i2;
                int ind1=0;
                for(int k = str1.size()-1 ;  k >=0 ; k-- ){
                    if(str1[k] == '1'){
                        i1.pb(str1.size() - k -1 );   
                    }    
                }
                for(int k = str2.size()-1 ;  k >=0 ; k-- ){
                    if(str2[k] == '1'){
                        i2.pb(str2.size() - k -1 );   
                    }    
                }
                
                
            // cout<<i1.size()<<" "<<i2.size()<<endl;
                                    
                                    
                    
            int co =0 ;
            for(int k =0 ; k < i1.size() ; k ++ ){
                
                int ro  = i1[k];
                
                for(int l =0 ; l < m ; l ++ )
                    if(arr[ro][l] == '#')
                        co++;    
                
            }
             for(int k =0 ; k < i2.size() ; k ++ ){
                
                int ro  = i2[k];
                
                for(int l =0 ; l < n ; l ++ )
                    if(arr[l][ro] == '#')
                        co++;    
                
            }
            // cout<<co<<endl;
            
             for(int k =0 ; k < i1.size() ; k ++ ){
                
                for(int l = 0; l < i2.size() ; l ++ ){
                    
                    if(arr[i1[k]][i2[l]] == '#')
                        co--;
                }   
                
            }
            // cout<<co<<endl;
            if(tot - co ==  K )res++;
            
                
                
        }
        
    }
    
  cout<<res<<endl;
    
    
}

Measured memory_bytes: 4100