#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 

using namespace __gnu_pbds; 
using namespace std;

using   ll=long long;
using   ld=long double;

#define fast        	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ordered_set 	tree<pll, null_type,less<pll>, rb_tree_tag,tree_order_statistics_node_update>

#define endl        	"\n"
#define pb          	push_back
#define mp          	make_pair
#define F           	first
#define S           	second
#define int 			long long int
#define pll 			pair<ll , ll>

#define ALL(v)      	v.begin(),v.end()
#define ALLR(v)     	v.rbegin(),v.rend()
#define pii         	3.14159265358979323
#define inf     		LLONG_MAX
#define ones(x)     	__builtin_popcount(x)
#define fill(a,b)   	memset(a,b,sizeof(a))
#define mod 			1000000007

ll mod_pow(ll a,ll b) {
    ll res = 1;
    while(b)	
    {
        if(b&1) 	
        {
        	res=(res*a)%mod;
        }
        a=(a*a)%mod;
        b>>=1;
    }
    return res;
}

ll mod_inverse(ll a) {
	return mod_pow(a , mod-2);
}

void solve() {
    
    int n , m, kk;
    
    cin >> n >> m >> kk;
    
    string ss[n];
    
    for(int i = 0; i < n; ++i) {
    	cin >> ss[i];
    }
    
    int ans = 0;
    
    vector<string> v1;
    
    for(int i = 1; i <= n; ++i) {
    	string s = "";
    	
    	for(int j = 0; j < n; ++j) {
    		s.pb(j+'0');
    	}
    	map<string ,int> vis;
    	do {
    		string p = "";
    		for(int j = 0; j < i; ++j) {
    			p += s[j];
    		}
    		
    		sort(ALL(p));
    		
    		if(!vis[p]) {
    			v1.pb(p);
    		}
    		vis[p] = 1;
    	}while(next_permutation(ALL(s)));
    }
    
    vector<string> v2;
    
    for(int i = 1; i <= m; ++i) {
    	string s = "";
    	
    	for(int j = 0; j < m; ++j) {
    		s.pb(j+'0');
    	}
    	
    	map<string ,int> vis;
    	do {
    		string p = "";
    		for(int j = 0; j < i; ++j) {
    			p += s[j];
    		}
    		
    		sort(ALL(p));
    		
    		if(!vis[p]) {
    			v2.pb(p);
    		}
    		vis[p] = 1;
    	}while(next_permutation(ALL(s)));
    }
    
    
    for(int ii = 0; ii < v1.size(); ++ii) {
    	string u = v1[ii];
    	
    	for(int jj = 0; jj < v2.size(); ++jj) {
    		
    		string v = v2[jj];
    		
    		string k[n];
    		
    		
    		for(int i = 0; i < n; ++i) {
    			k[i] = ss[i];
    		}
    		
    		for(int i = 0; i < u.size(); ++i) {
    			for(int j = 0; j < m; ++j) {
    				k[u[i]-'0'][j] = '.';
    			}
    		}
    		
    		for(int i = 0; i < v.size(); ++i) {
    			for(int j = 0; j < n; ++j) {
    				k[j][v[i]-'0'] = '.';
    			}
    		}
    		
    		int res = 0;
    		
    		for(int i = 0; i < n; ++i) {
    			for(int j = 0; j < m; ++j) {
    				res += (k[i][j] == '#');
    			}
    		}
    		
    		if(res == kk ) {
    		//	cout << u << " " << v << endl;
    			ans++;
    		}
    	}
    }
    
    for(int jj = 0; jj < v2.size(); ++jj) {
    		
    		string v = v2[jj];
    		
    		string k[n];
    		
    		
    		for(int i = 0; i < n; ++i) {
    			k[i] = ss[i];
    		}
    		
    		
    		for(int i = 0; i < v.size(); ++i) {
    			for(int j = 0; j < n; ++j) {
    				k[j][v[i]-'0'] = '.';
    			}
    		}
    		
    		int res = 0;
    		
    		for(int i = 0; i < n; ++i) {
    			for(int j = 0; j < m; ++j) {
    				res += (k[i][j] == '#');
    			}
    		}
    		
    		if(res == kk ) {
    			ans++;
    		}
    	}
    	
    	for(int jj = 0; jj < v1.size(); ++jj) {
    		
    		string v = v1[jj];
    		
    		string k[n];
    		
    		
    		for(int i = 0; i < n; ++i) {
    			k[i] = ss[i];
    		}
    		
    		for(int i = 0; i < v.size(); ++i) {
    			for(int j = 0; j < m; ++j) {
    				k[v[i]-'0'][j] = '.';
    			}
    		}
    		
    		
    		int res = 0;
    		
    		for(int i = 0; i < n; ++i) {
    			for(int j = 0; j < m; ++j) {
    				res += (k[i][j] == '#');
    			}
    		}
    		
    		if(res == kk ) {
    			ans++;
    		}
    	}
    	
    	int res = 0;
    		
    		for(int i = 0; i < n; ++i) {
    			for(int j = 0; j < m; ++j) {
    				res += (ss[i][j] == '#');
    			}
    		}
    		
    		if(res == kk ) {
    			ans++;
    		}
    
    cout << ans;
}       

signed main() {
    fast;
    
    int t = 1;
    
    while(t--) {
        solve();
    }
 
    return 0;
}


Measured memory_bytes: 3632