#include <bits/stdc++.h>
#include <map>
#include <algorithm>
#include <vector>
#include <string.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <chrono>
#include <thread>
#include <string.h>
 
#define rep(i,n)    for(ll i=0;i<n;i++)
#define repu(i,k,n) for(ll i=k;i<=n;i++)
#define repd(i,k,n) for(ll i=k;i>=n;i--)
#define se second
#define fi first
#define pb push_back
#define mp make_pair
#define endl "\n"
#define INF (ll)ll_MAX
 
typedef long long ll;
typedef long double ld;
typedef std::pair<ll, ll> pii;
typedef std::vector<ll> vi;
typedef std::vector< pii > vii;
typedef std::vector< ll > vll;
typedef std::vector< std::pair < pii, ll > > vpp;
 
const ll N = 3*1e5 +5 ;
const long long MOD = 1000000007;
const long long MOD2 = 998244353;
const long long inf = 1e18;
 
using namespace std;

 

void solve()
{	
    ll h,w,k;
    cin>>h>>w>>k;

    ll a[h][w];
    char stri[w];

    for(ll i=0;i<h;i++){
        cin>>stri;
        for(ll j=0;j<w;j++){
            if(stri[j]=='.') a[i][j]=0;
            else a[i][j]=1;
        }
    }

    ll ans=0;

    ll poww = 1;
    for(ll i=0;i<w;i++) poww*=2;

    ll powh = 1;
    for(ll i=0;i<h;i++) powh*=2;
    // poww/=2;
    // powh/=2;

    // cout<<poww<<endl<<powh<<endl;

    for(ll i=0;i<powh;i++){
        for(ll j=0;j<poww;j++){
            ll ti = i;
            ll tj = j;
            ll row[h] = {0};
            ll ctrh=0;
            while(ti){
                if(ti%2==1) row[ctrh]=1;
                ti/=2;
                ctrh++;
            }
            ll col[w] = {0};
            ll ctrw=0;
            while(tj){
                if(tj%2==1) col[ctrw]=1;
                tj/=2;
                ctrw++;
            }     
            ll b[h][w];
            for(ll ai = 0;ai<h;ai++){
                for(ll aj=0;aj<w;aj++){
                    b[ai][aj] = a[ai][aj];
                }
            }    
            for(ll ai = 0;ai<h;ai++){
                if(row[ai]==1){
                    for(ll aj=0;aj<w;aj++){
                        b[ai][aj]=0;
                    }
                }
            }  
            for(ll ai = 0;ai<w;ai++){
                if(col[ai]==1){
                    for(ll aj=0;aj<h;aj++){
                        b[aj][ai]=0;
                    }
                }
            }               
            ll ctr = 0;
            for(ll ai = 0;ai<h;ai++){
                for(ll aj=0;aj<w;aj++){
                    if(b[ai][aj]) ctr++;
                }
            }                
            if (ctr==k){
                ans++;
                // coutb<<i<<j;
            }
        }
    }
    cout<<ans;


    
}
     
int main() {
    #ifndef ONLINE_JUDGE
        // for getting input from input.txt
        freopen("input.txt", "r", stdin);
        // for writing output to output.txt
        freopen("output.txt", "w", stdout);
    #endif
    //cout<<"helo";
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    ll t = 1;
    // cin>>t;
    ll ctr=0;
    while(t--)
    {   
        ctr++;
        if (ctr==14) cout<<1;
        solve();    
    } 
    cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
 
}

Measured memory_bytes: 3788