#include <bits/stdc++.h>

// definitions
#define __Imperial_Lord__ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define _cps CLOCKS_PER_SEC
#define f first
#define s second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define rep(i, l, r) for (long long i = (l); i < (long long)(r); i++)
#define repb(i, r, l) for (long long i = (r); i > (long long)(l); i--)
#define lowb(a, x) ( lower_bound((a).begin(), (a).end(), (x)) - (a).begin())
#define uppb(a, x) ( upper_bound((a).begin(), (a).end(), (x)) - (a).begin())
#define sum(a)     ( accumulate ((a).begin(), (a).end(), 0ll))
#define high(x) __builtin_popcountll(x)
#define pb push_back
#define pf push_front
#define p0(a) cout << a << " "
#define p1(a) cout << a << endl
#define p2(a, b) cout << a << " " << b << endl
#define p3(a, b, c) cout << a << " " << b << " " << c <<endl
#define p4(a, b, c, d) cout << a << " " << b << " " << c << " " << d <<endl
#define exec cerr<<"Time taken : "<<(ld)(clock())/_cps<<"s"<<endl
#define mod1 998244353
#define mod 1000000007
#define pi 3.1415926535897932384

using namespace std;

// alias name for common data types
typedef vector<long long> vl;
typedef vector<long double> vld;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector< pair<long long, long long> > vp;
typedef vector<tuple<long long , long long , long long> > vtup;
typedef deque <long long> dql;
typedef deque <char> dqc;
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;

const ll INF=1e18;

template <class ...Args>
istream &read_args(Args &...args) {return (cin >> ... >> args);}
#define read(...)   __VA_ARGS__; read_args(__VA_ARGS__)

// cin and cout overloaded for vectors
template<typename T>    istream& operator>>(istream& is,  vector<T>& v)
{
    for (auto& i : v) 
        is >> i;        
    return is;
}
template<typename T>             
ostream& operator<<(ostream& os,  vector<T>& v)
{
    for (auto& i : v) 
        os << i << ' '; 
        return os;
}

void subsetsUtil(vector<ll>& A, vector<vector<ll> >& res, 
                 vector<ll>& subset, ll index) 
{ 
    res.push_back(subset); 
    for (ll i = index; i < A.size(); i++) { 
        subset.push_back(A[i]); 
        subsetsUtil(A, res, subset, i + 1); 
        subset.pop_back(); 
    } 
  
    return; 
} 
 
vector<vector<ll> > subsets(vector<ll>& A) 
{ 
    vector<ll> subset; 
    vector<vector<ll> > res;
    ll index = 0; 
    subsetsUtil(A, res, subset, index); 
  
    return res; 
}

// code beigns in main
int main()
{
	__Imperial_Lord__
    ll t=1;
    // cin >> t;
    
    while(t--)
    {
    	ll read(n,m,k);
    	char a[n][m];

    	rep(i,0,n)
    	rep(j,0,m)
    	cin >> a[i][j];

    	vl cr(n,0),cc(m,0);
    	ll tb=0;
    	rep(i,0,n)
    	{
    		rep(j,0,m)
    		if(a[i][j]=='#')
    		{
    			cr[i]++;
    			cc[j]++;
    			tb++;
    		}
    	}

    	// p1(cr);p1(cc);p1(tb);

    	ll ans=0;
    	vl r(n),c(m);
    	rep(i,0,n) r[i]=i;
    	rep(j,0,m) c[j]=j;

    	vector<vector<ll> > resr,resc;
    	resr=subsets(r);
    	resc=subsets(c);

    	// rep(i,0,resr.size())
    	// p1(resr[i]);
    	// p1("");
    	// rep(i,0,resc.size())
    	// p1(resc[i]);
    	// p1("");


    	rep(i,0,resr.size())
    	{
    		rep(j,0,resc.size())
    		{
    			ll cnt=0;
    			rep(l,0,resr[i].size())
    				cnt+=cr[resr[i][l]];

    			rep(l,0,resc[j].size())
    				cnt+=cc[resc[j][l]];

    			rep(l,0,resr[i].size())
    			{
    				rep(z,0,resc[j].size())
    				{
    					if(a[resr[i][l]][resc[j][z]]=='#')
    						cnt--;
    				}
    			}

    			// p1(cnt);
    			if(tb-cnt==k) ans++;
    		}
    	}

    	p1(ans);
    }	
    exec;
}

Measured memory_bytes: 3796