//NAME-DEEPESH BHATT
//Institute-IIT Dhanbad
//MOTTO-THINK FIRST,CODE LATER

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
ll MOD = 1000000007  ;
#define endl '\n'
#define pb push_back
#define mp make_pair

//Check for signed int overflow
// use __builtin_popcount(num) to calculate no.of setbits in num
//s.lower_bound() works in O(logn) whereas lower_bound(s.begin(),s.end(),x) works in O(n)
//      if(!lazy)
//         solve 1600+(rating) problems in codeforces.
//      else
//         solve 1400+(rating) problems in codeforces.

ll gcd(ll a,ll b)
{
    if(b==0)
        return a;
    else
        return gcd(b,a%b);
}
ll lcm(ll a ,ll b)
{
    return a/gcd(a,b)*b;
}
ll power(ll a,ll n){
    if (n == 0)
        return 1;
    ll p = power(a, n / 2);
    p = (p * p)%MOD;
    if (n % 2)
        return (p * a)%MOD;
    else
        return p%MOD;
}

/*vector<bool>is_prime(1000001,true);
void sieve(){
    is_prime[0]=is_prime[1]=false;
    is_prime[2]=true;
    for(int i=2;i*i<=1000000;i++){
        if(is_prime[i]){
            for(int j=i*i;j<=1000000;j+=i){
                is_prime[j]=false;
            }
        }
    }
}*/


int32_t main()
{
    ios_base::sync_with_stdio(false);    //for fast I/O operation
    cin.tie(nullptr);
    ll test=1;
    /*cin>>test;*/
    while(test--) {
        ll m,n,k;
        cin>>m>>n>>k;
        char mat[m][n];
        for(ll i=0;i<m;i++){
            for(ll j=0;j<n;j++){
                cin>>mat[i][j];
            }
        }
        vector<string>col;
        vector<string>row;
        col.emplace_back("0");
        col.emplace_back("1");
        row.emplace_back("0");
        row.emplace_back("1");
        for(ll i=1;i<n;i++){
            ll len=col.size();
            for(ll x=0;x<len;x++){
                if(col[x].size()==i){
                    string s1=col[x],s2=col[x];
                    s1.push_back('0');
                    s2.push_back('1');
                    col.push_back(s1);
                    col.push_back(s2);
                }
            }
        }
        for(ll i=1;i<m;i++){
            ll len=row.size();
            for(ll x=0;x<len;x++){
                if(row[x].size()==i){
                    string s1=row[x],s2=row[x];
                    s1.push_back('0');
                    s2.push_back('1');
                    row.push_back(s1);
                    row.push_back(s2);
                }
            }
        }
        ll ans=0;
        for(auto x:col){
            if(x.size()==n){
                for(auto y:row){
                    if(y.size()==m){
                        char copy[m][n];
                        for(ll i=0;i<m;i++){
                            for(ll j=0;j<n;j++){
                                copy[i][j]=mat[i][j];
                            }
                        }
                        for(ll i=0;i<x.size();i++){
                            if(x[i]=='1'){
                                for(ll j=0;j<m;j++){
                                    copy[j][i]='.';
                                }
                            }
                        }
                        for(ll i=0;i<y.size();i++){
                            if(y[i]=='1'){
                                for(ll j=0;j<n;j++){
                                    copy[i][j]='.';
                                }
                            }
                        }
                        ll count=0;
                        for(ll i=0;i<m;i++){
                            for(ll j=0;j<n;j++){
                                if(copy[i][j]=='#'){
                                    count++;
                                }
                            }
                        }
                        if(count==k){
                            ans++;
                        }
                    }
                }
            }
        }
        cout<<ans<<endl;
    }
    return 0;
}

Measured memory_bytes: 3528