#include <iostream>
#include <vector>
#include <map>
#include <string>
#include <tuple>
#include <algorithm>
using namespace std;


int isok(vector<int> h_select, vector<int> w_select, vector< vector<char> > field, int K){
    vector< vector<char> > f_copy(h_select.size(), vector<char>(w_select.size(), 0));
    // 初期化
    for(size_t i=0;i<h_select.size();i++){
        for(size_t j=0;j<w_select.size();j++){
            f_copy[i][j] = field[i][j];
        }
    }

    for(size_t i=0;i<h_select.size();i++){
        if(h_select[i]==1){
            for(size_t j=0;j<w_select.size();j++){
                f_copy[i][j] = '/';
            }
        }
    }

    for(size_t j=0;j<w_select.size();j++){
        if(w_select[j]==1){
            for(size_t i=0;i<h_select.size();i++){
                f_copy[i][j] = '/';
            }
        }
    }

    

    int count=0;
    for(int i=0;i<h_select.size();i++){
        for(int j=0;j<w_select.size();j++){
            //cout << field[i][j];
            if(f_copy[i][j]=='#'){
                count++;
            }
        }
        //cout << endl;
    }
    //cout << count << endl;
    if(count==K){
        return 1;
    }else{
        return 0;
    }
}


void gen(vector<int>& h_select, vector<int>& w_select, int num){

    int H = h_select.size();
    int W = w_select.size();

    for(size_t i=0;i<h_select.size();i++){
        h_select[i] = 0;
    }
    for(size_t j=0;j<w_select.size();j++){
        w_select[j] = 0;
    }
    if(num==0){
        return;
    }

    int last = 1;
    for(int i=0;i<(H+W)-1;i++){
        last *=2;
    }

    for(int x=last,idx=0;x!=0;x/=2,idx++){
        if(num>=x){
            if(idx<H){
                h_select[idx] = 1;
            }else{
                w_select[idx-H] = 1;
            }
            num-=x;
        }
    }

    return;
}



int main(){

    int H,W,K;
    cin >> H >> W >> K;

    vector< vector<char> > field(H, vector<char>(W, 0));

    for(int i=0;i<H;i++){
        for(int j=0;j<W;j++){
            cin >> field[i][j];
        }
    }

    /*

    |{ {}x{} }|

    2**12
    4096通り
    */

    //vector<int> h_select(H,0);
    //vector<int> w_select(W,0);


    int last = 1;
    for(int i=0;i<(H+W);i++){
        last *=2;
    }
    int count=0;
    vector<int> h_select(H,0);
    vector<int> w_select(W,0);
    for(int i=0;i<=last;i++){
        gen(h_select,w_select,i);

        //cout << i << " , h_select: ";
        //for(int h=0;h<h_select.size();h++){
        //    if(h_select[h]==1) cout << h << ' ';
        //}cout << ", w_select: ";
        //for(int w=0;w<w_select.size();w++){
        //    if(w_select[w]==1) cout << w << ' ';
        //}cout << endl;

        count += isok(h_select,w_select,field,K);
    }
    cout << count << endl;

    /*
    // 何もして無くても既に #黒 足りない
    int count=0;
    for(int i=0;i<H;i++){
        for(int j=0;j<W;j++){
            if(field[i][j]=='#'){
                count++;
            }
        }
    }
    if(count>K){
        cout << 0 << endl;
    }else if(count==K){ // ぴったりなら
        // すべて .白 な行を選んでも良い
        // すべて .白 な列を選んでも良い
        // 何もしない +1
        
        cout << 1 << endl;
    }else{


    }*/
    
    return 0;
}

Measured memory_bytes: 3636