#include <iostream>
#include <list>
#include <algorithm>
#include <map>
#include <math.h>
#include <set>
#include <string>
#include <algorithm>
#include <list>
#include <string.h>
#include <unordered_map>
#include <ctype.h>
#include <queue>
#include <numeric>
#include <vector>
#include <iomanip>
#include <cstdlib>
#include <stack>
#include <ctime>
#define  lld long long int
#define rep(i,start,end) for(lld i = start;i<end;i++)
#define newline cout << endl
#define fastio ios:: sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define pb push_back
#define in insert
#define mp make_pair
#define se second
#define fi first
#define starttime chrono::time_point<chrono::system_clock> start, end; start = chrono::system_clock::now()
#define showtime end = chrono::system_clock::now();  chrono::duration<double> elapsed_seconds = end - start; time_t end_time = chrono::system_clock::to_time_t(end); cout << "elapsed time: " << elapsed_seconds.count() << "s\n"
#define INF 1e17
lld MOD =  (lld)(1e9+7);
#define mh make heap
#define ph push_heap
#define poph pop_heap
#define openf   freopen("input.txt", "rt", stdin); freopen("output.txt", "wt", stdout);
using namespace std;
lld add(long long a, long long b){return ((a%MOD)+(b%MOD))%MOD;}
lld mul(long long a, long long b){return ((a%MOD)*(b%MOD))%MOD;}
lld sub(long long a, long long b){lld ans = ((a%MOD-b%MOD))%MOD; if(ans<0) ans += MOD; return ans;}
lld modInverse(lld a ){   lld m = MOD,m0 = m, y = 0, x = 1;  if (m == 1) return 0;   while (a > 1) {  lld q = a / m, t = m;  m = a % m, a = t, t = y;          y = x - q * y, x = t;   } if (x < 0)  x += m0; return x; } 
lld gcd(lld a, lld b){if (b == 0) return a; return gcd(b, a % b);}
void MAIN(lld i,lld t);
int get(){lld t;cin>>t; ; return t;}
int log(string name){cout<<name<<endl; return 0;}
void test(int t) { for(lld i = 0;i<t;i++){MAIN(i,t); cout <<endl;} }
lld power(lld x, lld y) { lld res = 1; x = x%MOD; if(x==0) return 0;   while (y > 0) {   if (y & 1)      res = (res*x)%MOD; y = y>>1; x = (x*x)%MOD;} return res; }
#define all(v) (v).begin(),(v).end()
lld popcount(lld x){return __builtin_popcount(x);}
lld lcm(lld a,lld b){ return (a*b)/gcd(a,b);}
lld h,w,k; vector<char> v[10];
string tbin(lld n){
    string s;
    if(n==0||n<0) s +='0';
    while(n!=0){
        if(n%2==0) s+='0';
        else s+='1';
        n = n/2;
    }
    return s;
}

lld get_sum(string r, string c){
    lld count = 0;
    for(int i = 0;i<10;i++)
        r +='0', c+='0';
    for(int i = 0;i<h;i++){
        for(int j = 0;j<w;j++){
            if(r[i]=='1'||c[j]=='1') continue;
            if(v[i][j]=='#') count++;
        }
    } 
    return count;
}
void MAIN(lld current_test_case,lld total_test_cases){
    cin >> h >> w >> k;
    for(int i = 0;i<h;i++) for(int j = 0;j<w;j++){char c; cin >> c; v[i].pb(c);};
    lld N = 2000, M = 200;
    lld ans = 0;
    map<pair<string,string>,int > m;
    for(int i = 0;i<=N;i++){
     for(int j = 0;j<=M;j++){
            string rn = tbin(i), rm = tbin(j);
            string r,c;
            lld f = rn.size();
            for(int p = f;p<=h;p++)
                rn +='0';
            f = rm.size();
            for(int p = f;p<=w;p++)
                rm +='0';
            for(int p = 0;p<h;p++)
                r += rn[p];
            for(int p = 0;p<w;p++)
                c += rm[p];
            if(m.count(mp(r,c))>=1) continue;
            m[mp(r,c)]++;
            lld count = get_sum(rn,rm);
            if(count==k)
               ans++;
         }
    }
    cout << ans << endl;
}   
int main(){  
    fastio;
    #ifndef ONLINE_JUDGE 
     openf
    #endif
    test(1);
    return 0;
}


Measured memory_bytes: 4108