/*input
6 6 8
..##..
.#..#.
#....#
######
#....#
#....#
*/
 
 
#include <bits/stdc++.h>
 
using namespace std;
 
#define ld long double
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define vvi vector < vi >
#define pii pair<int,int>
#define pll pair<long long, long long>
#define vpll vector < pair<long long,long long> >
#define fill(a,val)  memset(a,val, sizeof (a))
#define sort_unique(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
#define mp make_pair
#define pb push_back
#define f first
#define se second
#define all(cont) cont.begin(), cont.end()
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
#define MAX   1e9
#define MIN  -1e9
typedef map<long long int, long long int> mpi;
typedef set<long long int> seti;
typedef multiset<long long int> mseti;
typedef priority_queue<long long int> pq;
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define rep(i, n)    for(long long int 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 tr(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
#define repn(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define PI 3.14159265
#define dbg(x) cerr << "\n" << (#x) << " = " << (x) << endl ;
//#define cerr if(false)cerr
 
#define mod 998244353
 
struct node{
    ll val;
};
struct Interval {int start, end;};
bool compare(struct node n1, struct node n2) {
    return (n1.val < n2.val);
}
 
 
 ll gcd(ll a, ll b) 
{ 
    if (b == 0) 
        return a; 
    return gcd(b, a % b);  
      
} 





vector <int> decToBinary(ll n, ll pad) 
{ 
    int binaryNum[32];  
    int i = 0; 
    while (n > 0) { 
        binaryNum[i] = n % 2; 
        n = n / 2; 
        i++; 
    } 

    while(i < pad){
    	binaryNum[i] = 0;
    	++i;
    }

  	vector <int> binary;
    for (int j = i - 1; j >= 0; j--) 
        binary.push_back(binaryNum[j]); 


    return binary;
} 

 
int main() 
{
    ll H,W,K; cin>>H>>W>>K;
    char mat[6][6];
    rep(i,H){
    	rep(j,W)
    		cin>>mat[i][j];
    }


    ll answer = 0;

    rep(i,pow(2,H)){
    	vector <int> row_masks = decToBinary(i,H);


    	rep(j,pow(2,W)){
    		vector <int> col_masks = decToBinary(j,W);

    		char matc[6][6];

    		rep(i1,H){
    			rep(j1,W)
    				matc[i1][j1] = mat[i1][j1];
    		}

    		// rep(i1,H)
    		// 	cout<<row_masks[i1];

    		// cout<<endl;

    		// rep(i1,W)
    		// 	cout<<col_masks[i1];

    		// cout<<endl;
    		// cout<<endl;

    		// rep(i1,H){
    		// 	rep(j1,W)
    		// 		cout<<mat[i1][j1];

    		// 	cout<<endl;
    		// }
    		// cout<<endl;

    		rep(i1,H){
    			if(row_masks[i1]==1){
    				rep(j1,W){
    					matc[i1][j1] = 'R';
    				}
    			}
    		}

    		rep(j1,W){
    			if(col_masks[j1]==1){
    				rep(i1,H){
    					matc[i1][j1] = 'R';
    				}
    			}
    		}

    		ll counter = 0;
    		rep(i1,H){
    			rep(j1,W){
    				if(matc[i1][j1] == '#')
    					counter++;
    			}
    		}

    		//cout<<counter<<endl<<endl<<endl;

    		if(counter == K)
    			answer++;

    	} 
    }
   cout<<answer;

    return 0;  
}
 

Measured memory_bytes: 4048