#include <bits/stdc++.h>
using namespace std;




//----------------------------MACROS-------------------------------------------------
#define pb insert//                                                                 |
#define eb emplace_back//                                                           |
#define ff first//                                                                  |
#define ss second//                                                                 |
typedef long long int ll;//                                                         |
typedef long double ld;//                                                           |
#define all(a) a.begin(), a.end()//                                                 |
#define show(x) cerr << #x << " is " << x << "\n"//                                 |
#define show2(x, y) cerr << #x << " " << #y << " " << x << " " << y << "\n"//       |
typedef vector<ll> vl;//                                                            |
typedef vector<vl> vvl;//                                                           |
typedef pair<ll, ll> pp;//                                                          |
typedef vector<pp> vp;//                                                            |
typedef map<pp, ll> ipi;//                                                          |
typedef map<pp, char> ipc;//                                                        |
typedef map<ll, ll> ii;//                                                           |
typedef set<ll> sl;//                                                               |
typedef multiset<ll> msl;//                                                         |
typedef map<char, ll> ci;//                                                         |
typedef set<pair<ll, ll>> sp;//                                                     |
const ll mod = 1e9 + 7;//                                                           |
const ll N = 2e6 + 1;//                                                             |
//----------------------------------------------------------------------------------

ll fast_expo(ll x, ll y){
    
    ll res=1;
    while(y>0){
        if(y&1){
            res*=x;
        }
        x*=x;
        y>>=1;
    }
    return res;
}



//main func
void solve()
{
    ll a,b,c;cin>>a>>b>>c;
    char grid[a][b];
    for(int i=0;i<a;i++){
        for(int j=0;j<b;j++){
            cin>>grid[i][j];
        }
    }
    ll ans=0;
    for(int i=0;i<1<<a;i++){
        for(int j=0;j<1<<b;j++){
            ll tmp=0;
            
            for(int k=0;k<a;k++){
                //cout<<i<<" "<<k<<"\n";
                ll yo=fast_expo(2,k);
                if(yo&i){
                    for(int l=0;l<b;l++){
                        ll lol=fast_expo(2,l);
                        if(lol&j && grid[k][l]=='#'){//show2(j,l);
                            tmp++;
                        }
                    }
                    
                }
                
            }
            //show(tmp);
            if(tmp==c) ans++;
        }
        
    }
    cout<<ans<<"\n";
}


int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
    
    ll t;
    t=1;
    //cin>>t;
    while(t--){
        solve();
    }
    
	return 0;
}


Measured memory_bytes: 3640