#pragma optimize("O3")
#pragma GCC target ("sse4")

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

typedef long long int ll;
typedef pair<ll, ll> pii;
#define f(i,a,b) for(ll i=a;i<b;i++)
#define fo(i,a,b) for(ll i = a; i<=b;i+=1)
#define rf(i,a,b)  for(ll i=a;i>=b;i--)
#define vll vector<ll>
#define sz(a) ll(a.size())
#define all(v) v.begin(),v.end()
#define pb push_back
#define pf push_front 
#define MAXN 100010
#define N 100010
#define MOD 1000000007
#define mod 998244353
#define deb(x) cout << '>' << #x << ':' << x << endl;
#define nl '\n'
#define MS(x,y) fill_n(*x, sizeof x / sizeof **x, y);
#define mem(x,y) memset(x,y,sizeof(x));
#define INF 1000000000000000000
#define IO                 \
	ios::sync_with_stdio(0); \
	cin.tie(0);              \
	cout.tie(0);

template<int D, typename T>
struct Vec : public vector<Vec<D - 1, T>> {
static_assert(D >= 1, "Vector dimension must be greater than zero!");
template<typename... Args>
	Vec(int n = 0, Args... args) : vector<Vec<D - 1, T>>(n, Vec<D - 1, T>(args...)) {
	}
};
template<typename T>
struct Vec<1, T> : public vector<T> {
	Vec(int n = 0, const T& val = T()) : vector<T>(n, val) {
	}
};

ll modpower(ll x, ll y,ll p)
{
    ll res = 1;     // Initialize result
    x = x % p;
    if (y==0)return 1;
    if(x==0)return 0;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x) % p;
        y = y>>1; // y = y/2
        x = (x*x) % p;  // Change x to x^2
    }
    return res;
}
ll power(ll x, ll y)
{
    ll res = 1;     // Initialize result
    x = x ;
    if (y==0)return 1;
    if(x==0)return 0;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x);
        y = y>>1; // y = y/2
        x = (x*x);  // Change x to x^2
    }
    return res;
}
// int gcd(int a, int b) { if (a == 0)return b;return gcd(b % a, a);}

ll modinv(ll a,ll p){return modpower(a,p-2,p);}

const int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1}, dy[8] = {0, 1, 0, -1, -1, 1, -1, 1};

long long safe_sqrt(long long n) {
    long long res = sqrt((long double) n);
    if (res*res == n) return res;
    const long double eps = 1e-8;
    if ((long double)(res+1)*(res+1) < n + eps) return res+1;
    if ((long double)res*res + eps > n) return res-1;
    return res;
}   
// (a+b-1)/b for ceil
void solve(){
    ll h,w,k;
    cin>>h>>w>>k;
    Vec<2,char> arr(h,w);
    ll black = 0;
    f(i,0,h){
        f(j,0,w){
            cin>>arr[i][j];
            if (arr[i][j]=='#')
            {
                black++;
            }
        }
    }
    ll twoh = power(2,h);
    ll twow = power(2,w);
    // deb(twoh)
    // deb(twow)
    ll ans = 0;
    fo(i,0,twoh-1){
        fo(j,0,twow-1){
            ll cur = 0;
            Vec<2,char> temp(h,w);
            f(i,0,h){
                f(j,0,w){
                    temp[i][j] = arr[i][j];
                }
            }
            ll ii = i, jj = j;
            ll x = 0;
            while(ii>0){
                if (ii%2)
                {
                    f(j,0,w){
                        temp[x][j] = '/';
                    }
                }
                ii/=2;
                x++;
            }
            x = 0;
            while(jj>0){
                if (jj%2)
                {
                    f(i,0,h){
                        temp[i][x] = '/';
                    }
                }
                jj/=2;
                x++;
            }
            f(i,0,h){
                f(j,0,w){
                    // deb(temp[i][j])
                    if(temp[i][j]=='#'){
                        cur++;
                    }
                }
            }
            // deb(i)
            // deb(j)
            // deb(cur)
            if (k==cur)
            {
                ans++;
            }
        }
    }
    cout<<ans<<nl;
    return ;
}
int main()
{
    IO;
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    #endif
    int T = 1;
    // cin >> T;
    f(c, 0, T){
        solve();
    }
    return 0;
}//multiset m make_pair make_tuple  tuple<int,int,int> continue resize insert count size else true isValid second first false erase double priority_queue 
//cout<<setprecision(12); push_back pop_back pop_front push_front  lower_bound upper_bound  reverse

Measured memory_bytes: 3644