#define DAY 365
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
const int MOD = 1000000007;

int main(){
    int h, w, k;
    cin >> h >> w >> k;
    char s[7][7] = {'.'};
    int b = 0;
    for (int i = 0; i < 7;i++){
        s[0][i] = '.';
        s[i][0] = '.';
    }
        for (int i = 0; i < h; i++)
        {
            for (int j = 0; j < w; j++)
            {
                cin >> s[i][j];
                if (s[i][j] == '#')
                {
                    b++;
                }
            }
        }
        int tate[7], yoko[7];

        for (int i = 0; i < 7;i++){
            int t = 0;
            for (int j = 0; j < 7;j++){
                if(s[i][j]=='#'){
                    t++;
                }
            }
            tate[i] = t;
        }
        for (int i = 0; i < 7; i++)
        {
            int t = 0;
            for (int j = 0; j < 7; j++)
            {
                if (s[j][i] == '#')
                {
                    t++;
                }
            }
            yoko[i] = t;
        }
        
        int ans = 0;
        /*
        for (int i = 0; i <= h;i++){
            cout << tate[i] << endl;
        }
            int ans = 0;
        for (int i = 0; i <= h; i++)
        {
            for (int j = 0; j <= w; j++)
            {
                int tmp = 0;
                tmp += tate[i] + yoko[j];
                if(s[i][j] == '#'){
                    tmp--;
                }
                if (tmp == k){
                    ans++;
                    cout << i << "," << j << endl;
                }
            }
    }
    */
  
        for (int bit1 = 0; bit1 < (1 << h); ++bit1)
        {
            for (int bit2 = 0; bit2 < (1 << w); bit2++)
            {
                bool ch1[7] = {false}, ch2[7] = {false};
                int tp = 0;
                for (int i = 0; i < h;i++){
                    if(bit1 & (1<<i)){
                        tp += tate[i];
                        ch1[i] = true;
                    }
                }
                for (int i = 0; i < w; i++)
                {
                    if (bit2 & (1 << i))
                    {
                        tp += yoko[i];
                        ch2[i] = true;
                    }
                }
                for (int i = 0; i < 7;i++){
                    for (int j = 0; j < 7;j++){
                        if(s[i][j] == '#' && ch1[i] == true && ch2[j] == true){
                            tp--;
                        }
                    }
                }
                if(k==b-tp){
                    ans++;
                    int c1 = 0, c2 = 0;
                    for (int i = 0; i < h;i++){
                        /*
                        if(ch1[i] == true){
                            cout << "tate"<<i << endl;
                            c1++;
                        }
                        */
                        //cout << "tate" << i << "=" << ch1[i] << endl;
                    }
                    for (int i = 0; i < w; i++)
                    {
                        /*
                        if (ch2[i] == true)
                        {
                            c2++;
                            cout << "yoko"<<i << endl;
                        }*/
                        //cout << "yoko" << i << "=" << ch2[i] << endl;
                    }
                    //cout << endl;
                }
            }
            
    }
    cout << ans;
}

Measured memory_bytes: 3628