#include<bits/stdc++.h>
#define ll long long 
#define ull unsigned long long
#define FIO ios_base::sync_with_stdio(false);cin.tie(NULL);
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define ff first
#define ss second
#define vll vector<ll>
#define pll pair<ll,ll>
#define vpll vector<pll>
#define vvll vector<vll>
#define all(v) v.begin(),v.end()
#define itr(r,v) for(auto r=v.begin();r!=v.end();r++)
#define FOR(i,n) for(ll i=0;i<n;i++)
#define ffor(i,a,b) for(ll i=a;i<=b;i++)
#define rfor(i,a,b) for(ll i=a;i>=b;i--)
#define space cout<<"\n\n";
#define endl "\n"
#define pqmx priority_queue<ll>
#define pqmn priority_queue<ll,vll,greater<ll>>
#define fps(x,y) fixed<<setprecision(y)<<x
#define merg(a,b,c) set_union(a.begin(),a.end(),b.begin(),b.end(),inserter(c,c.begin()))
#define set_ar(arr,v) memset(arr,v,sizeof(arr))
#define ctime auto start = high_resolution_clock::now()
#define etime auto stop = high_resolution_clock::now()
#define ptime auto z1z = duration_cast<microseconds>(stop-start); cout<<"Time elapsed : "<<z1z.count()<<" microseconds\n"
#define dbg1(x)             cout <<#x<<": "<<x<<'\n';
#define dbg2(x, y)          cout <<#x<<": "<<x<<" | "<<#y<<": "<<y<<'\n';
#define dbg3(x, y, z)       cout <<#x<<": "<<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<'\n';
#define dbg4(a, b, c, d)    cout <<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<'\n';
#define dbg5(a, b, c, d, e) cout <<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<<": "<<e<<'\n';

using namespace std;
using namespace std::chrono;

const ll MOD = 1e9+7;
const ll N = 1e6+6;
const ll maxN = 1e6+6;

ll power(ll x,ll y, ll M = MOD) // default argument
{ll v=1;x=x%M;while(y>0){if(y&1)v=(v*x)%M;y=y>>1;x=(x*x)%M;}return v;}

int main()
{
    #ifndef ONLINE_JUDGE
        freopen("input1.txt", "r", stdin);
        freopen("output1.txt", "w", stdout);
    #endif
    FIO
    ll h,w,k; cin>>h>>w>>k;
    char ar[h][w];
    ll total=0;
    FOR(i,h){
        FOR(j,w){
            cin>>ar[i][j];
            if(ar[i][j] == '#'){
                total++;
            }
        }
    }
    ll ans=0;
    // dbg1(total);
    // if(total == k){
    //     cout<<"1"; return 0;
    // }
    for(ll i=0;i<(1<<h);i++){
        for(ll j=0;j<(1<<w);j++){
            bool red[h][w]={};
            for(ll kk=0;kk<h;kk++){
                if(i & (1<<kk)){
                    for(ll ii=0;ii<w;ii++){
                        red[kk][ii]=1;
                    }
                }
            }
            for(ll kk=0;kk<w;kk++){
                if(j & (1<<kk)){
                    for(ll ii=0;ii<h;ii++){
                        red[ii][kk]=1;
                    }
                }
            }
            //
            ll cnt=0;
            FOR(ii,h){
                FOR(jj,w){
                    if((!red[ii][jj]) && ar[ii][jj] == '#'){
                        cnt++;
                    }
                }
            }
            if(cnt == k){
                ans++;
                // cout<<i<<" "<<j<<endl;
                // FOR(ii,h){
                //     FOR(jj,w){
                //         cout<<red[ii][jj]<<" ";
                //     }
                //     cout<<endl;
                // }
                // cout<<endl;
            }
        }
    }
    cout<<ans<<"\n";
    return 0;
}


Measured memory_bytes: 3644