#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(ll i = 0; i < (n); ++i)
#define repA(i, a, n) for(ll i = a; i < (n); ++i)
#define repD(i, a, n) for(ll i = a; i > (n); --i)
#define trav(a, x) for(auto& a : x)
#define all(x) x.begin(), x.end()
#define sz(x) (long long) (x).size()
#define fill(a) memset(a, 0, sizeof(a))
#define fst first
#define snd second
// #define mp make_pair
#define pb push_back
// #define endl "\n"
// #define MAXN 10000001
const long double PI = 3.141592653589793238462643383;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<long long int> vll;
typedef vector<double> vd;
typedef vector<pii> vii;
long long Ceil(long long a, long long b){
    if(a%b==0) return a/b;
    else return (a/b)+1;
}
ll p=1000000007;
float E = 0.00000000000001;
ll power(ll x, ll y){
    if(y==0){
        return 1;
    }
    if(y%2==0){
        ll q=power(x,y/2);
        q=q%p;
        return (q*q)%p;
    }
    ll q=power(x,y/2);
    q=q%p;
    return ((x%p)*((q*q)%p))%p; 
}
bool sortbysec(const pair<int,int> &a, 
              const pair<int,int> &b) 
{ 
    return (a.second < b.second); 
}

bool isPowerOfTwo (long long x)  
{  
    /* First x in the below expression is for the case when x is 0 */
    return x && (!(x&(x-1)));  
}  

long long int gcd(long long int a, long long int b){ 
    if (a == 0) 
        return b;  
    return gcd(b % a, a); 
}
long long int mod(long long int a, long long int b) {
    long long int ret = a%b; return ret>=0? ret: ret+b; 
}

int powerCount(int num, int x){
    int count = 0;
    while(!(num%x)){
        count++;
        num/=x;
    }
    return count;
}

vector <int> SieveOfEratosthenes(int n) 
{ 
    // Create a boolean array "prime[0..n]" and initialize 
    // all entries it as true. A value in prime[i] will 
    // finally be false if i is Not a prime, else true. 
    vector <int> prime(n+1, 1); 
    prime[1] = 0;
    prime[0] = 0;
    for (long long p=2; p*p<=n; p++) 
    { 
        // If prime[p] is not changed, then it is a prime 
        if (prime[p] == 1) 
        { 
            // Update all multiples of p greater than or  
            // equal to the square of it 
            // numbers which are multiple of p and are 
            // less than p^2 are already been marked.  
            for (long long i=p*p; i<=n; i += p) 
                prime[i] = 0; 
        } 
    } 
  
    // Print all prime numbers 
    return prime;
}
bool proper(int i, int j, int n, int m){
	return i>=0 && j>= 0 && i<n && j<m;
}
ll spf[10000001]; 
ll MAXN = 10000001;
// Calculating SPF (Smallest Prime Factor) for every 
// number till MAXN. 
// Time Complexity : O(nloglogn) 
void sieve() 
{ 
    spf[1] = 1; 
    for (ll i=2; i<MAXN; i++) 
  
        // marking smallest prime factor for every 
        // number to be itself. 
        spf[i] = i; 
  
    // separately marking spf for every even 
    // number as 2 
    for (ll i=4; i<MAXN; i+=2) 
        spf[i] = 2; 
  
    for (long long i=3; i*i<MAXN; i++) 
    { 
        // checking if i is prime 
        if (spf[i] == i) 
        { 
            // marking SPF for all numbers divisible by i 
            for (ll j=i*i; j<MAXN; j+=i) 
  
                // marking spf[j] if it is not  
                // previously marked 
                if (spf[j]==j) 
                    spf[j] = i; 
        } 
    } 
} 
  
// A O(log n) function returning primefactorization 
// by dividing by smallest prime factor at every step 
vector<ll> getFactorization(ll x) 
{ 
    vector<ll> ret; 
    while (x != 1) 
    { 
        ret.push_back(spf[x]); 
        x = x / spf[x]; 
    } 
    return ret; 
} 
bool isPrime(long long n) 
{ 
    // Corner cases 
    if (n <= 1)  return false; 
    if (n <= 3)  return true; 
  
    // This is checked so that we can skip  
    // middle five numbers in below loop 
    if (n%2 == 0 || n%3 == 0) return false; 
  
    for (long long i=5; i*i<=n; i=i+6) 
        if (n%i == 0 || n%(i+2) == 0) 
           return false; 
  
    return true; 
} 
void helper_col(vector <string> &vec, int idx, int k, vector<int> &row, vector<int> &col, vector<int> &path, int &ans){
	int h = vec.size(), w = vec[0].size();
	if(k == 0){
		// cout<<idx<<" ";
		// for(auto& x:path)
		// 	cout<<x<<" ";
		// cout<<endl;
		ans++;
	}
	if(k < 0)
		return;
	for(int j = idx ; j < w ; j++){
		// if(path.empty())
			// cout<<j<<" "<<idx<<" "<<k<<endl;
		int num = col[j];
		// k -= col[j];
		for(auto& x:path)
			num -= vec[x][j]=='#'?1:0;
		k -= num;
		helper_col(vec, j+1, k, row, col, path, ans);
		k += num;
	}
}
void helper_row(vector <string> &vec, int idx, int k, vector<int> &row, vector<int> &col, vector <int> &path, int &ans){
	int h = vec.size(), w = vec[0].size();
	helper_col(vec, 0, k, row, col, path, ans);
	for(int i = idx ; i < h ; i++){
		k -= row[i];
		// if(i == 0)
		// 	cout<<k<<endl;
		path.push_back(i);
		// if(ans <= k)
			// helper_col(vec, 0, k, row, col, path, ans);
		helper_row(vec, i+1, k, row, col, path, ans);
		path.pop_back();
		k += row[i];
	}
}
int main(){
    std::ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);   
    freopen("output.txt", "w", stdout);
    #endif
    int t = 1;
    // cin>>t;
    while(t--){
    	int h,w,k;
    	cin>>h>>w>>k;
    	vector <string> vec(h);
    	for(int i = 0 ; i < h ; i++)
    		cin>>vec[i];
    	vector <int> row(h), col(w);
    	for(int i = 0 ; i < h ; i++){
    		int sum = 0;
    		for(int j = 0 ; j < w ; j++)
    			if(vec[i][j] == '#')
    				sum++;
    		row[i] = sum;
    	}
    	for(int j = 0 ; j < w ; j++){
    		int sum = 0;
    		for(int i = 0 ; i < h ; i++)
    			if(vec[i][j] == '#')
    				sum++;
    		col[j] = sum;
    	}
    	int count = 0;
    	for(auto x:vec)
    		for(auto y:x)
    			count += y=='#'?1:0;
    	// for(auto x:row)
    	// 	cout<<x<<" ";
    	// for(auto x:col)
    	// 	cout<<x<<" ";
    	int ans = 0;
    	vector <int> path;
    	// cout<<count-k<<endl;
    	helper_row(vec, 0, count-k, row, col, path, ans);
    	cout<<ans<<endl;
    }
    return 0;
}

Measured memory_bytes: 3660