/******************************************
* AUTHOR : kamesh_11 *
* INSTITUTION : GVPCOE *
******************************************/

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

#define pi 3.141592653589793
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define bs binary_search
#define endl '\n'
#define start_clock clock_t beginn=clock()
#define end_clock clock_t endd=clock()
#define cal_exec_time double time_spent=(double)(endd-beginn)/CLOCKS_PER_SEC
#define print_exec_time cout<<endl<<time_spent<<" secs"

typedef long long int ll;

const ll MOD = 1e9 + 7;

ll powmod(ll a,ll b) {ll res=1;a%=MOD; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%MOD;a=a*a%MOD;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}

int main() 
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    int h, w, k;
    cin>>h>>w>>k;
    char grid[h][w], temp[h][w];
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            cin>>grid[i][j];
            temp[i][j] = grid[i][j];
        }
    }

    int ans = 0, cntt = 0;
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            if(grid[i][j] == '#')
                cntt++;
        }
    }
    if(cntt == k)
        ans++;
    for(int i=1;i<pow(2,h);i++){
        int x = i;
        int row = 0;
        while(x){
            if(x & 1){
                for(int c=0;c<w;c++)
                    grid[row][c] = 'R';
            }
            x >>= 1;
            row++;
        }
        int cnt = 0;
        for(int r=0;r<h;r++){
            for(int c=0;c<w;c++){
                if(grid[r][c] == '#'){
                    cnt++;
                }
            }
        }
        if(cnt == k)
            ans++;
        for(int r=0;r<h;r++){
            for(int c=0;c<w;c++){
                grid[r][c] = temp[r][c];
            }
        }
    }

    for(int j=1;j<pow(2,w);j++){
        int x = j;
        int col = 0;
        while(x){
            if(x & 1){
                for(int r=0;r<h;r++)
                    grid[r][col] = 'R';
            }
            x >>= 1;
            col++;
        }
        int cnt = 0;
        for(int r=0;r<h;r++){
            for(int c=0;c<w;c++){
                if(grid[r][c] == '#'){
                    cnt++;
                }
            }
        }
        if(cnt == k)
            ans++;
        for(int r=0;r<h;r++){
            for(int c=0;c<w;c++){
                grid[r][c] = temp[r][c];
            }
        }
    }

    for(int i=1;i<pow(2,h);i++){
        for(int j=1;j<pow(2,w);j++){
            int x = i;
            int row = 0;
            while(x){
                if(x & 1){
                    for(int c=0;c<w;c++)
                        grid[row][c] = 'R';
                }
                x >>= 1;
                row++;
            }
            x = j;
            int col = 0;
            while(x){
                if(x & 1){
                    for(int r=0;r<h;r++)
                        grid[r][col] = 'R';
                }
                x >>= 1;
                col++;
            }
            int cnt = 0;
            for(int r=0;r<h;r++){
                for(int c=0;c<w;c++){
                    if(grid[r][c] == '#'){
                        cnt++;
                    }
                }
            }
            if(cnt == k)
                ans++;
            for(int r=0;r<h;r++){
                for(int c=0;c<w;c++){
                    grid[r][c] = temp[r][c];
                }
            }
        }
    }

    cout<<ans;

    return 0;
}

Measured memory_bytes: 4104