#include                            <iostream>
#include                            <list>
#include                            <stdio.h>
#include                            <math.h>
#include                            <string.h>
#include                            <time.h>
#include                            <stdlib.h>
#include                            <string>
#include                            <bitset>
#include                            <vector>
#include                            <set>
#include                            <map>
#include                            <queue>
#include                            <algorithm>
#include                            <sstream>
#include                            <stack>
#include                            <iomanip>
#include                            <numeric>
#include                            <unordered_map>


using namespace                     std;
#define MOD                         1000000007
#define int                          int64_t
#define baba_shiv                   ios_base::sync_with_stdio(false);cin.tie(NULL);
#define mpii                        map<int,int>
#define pb                          push_back
#define mkp                         make_pair
#define all(x)                      x.begin(),x.end()
#define allr(x)                     x.rbegin(),x.rend()
#define ub(v,x)                     upper_bound(all(v),x)
#define lb(v,x)                     lower_bound(all(v),x)
#define bs(v,x)                     binary_search(all(v),x)
#define gcd(a,b)                    __gcd(a,b)
#define lcm(a,b)                    (((a*b))/__gcd(a,b))
#define vi                          vector<int>
#define pii                         pair<int,int>
#define vpii                        vector<pii>
#define vs                          vector<string>
#define ff                          first
#define ss                          second
#define foru(v,s,e)                 for(int v=s;v<e;v++)
#define ford(v,s,e)                 for(int v=s;v>e;v--)
#define pi                          3.14159265358979323846



/***********************************************************************************************************************/
template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
    return os << "(" << p.first << ", " << p.second << ")";
}

template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
    os << "{";
    typename vector< T > :: const_iterator it;
    for ( it = v.begin(); it != v.end(); it++ ) {
        if ( it != v.begin() ) os << ", ";
        os << *it;
    }
    return os << "}";
}

template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
    os << "[";
    typename set< T > :: const_iterator it;
    for ( it = v.begin(); it != v.end(); it++ ) {
        if ( it != v.begin() ) os << ", ";
        os << *it;
    }
    return os << "]";
}

template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
    os << "[";
    typename map< F , S >::const_iterator it;
    for ( it = v.begin(); it != v.end(); it++ ) {
        if ( it != v.begin() ) os << ", ";
        os << it -> first << " = " << it -> second ;
    }
    return os << "]";
}

#define deb(x) cerr<< #x << " = " << x << endl;


/*struct CustomCompare
{
    bool operator()(pii &a, pii &b)
    {
        if (a.ss == b.ss)
            return a.ff < b.ff;
        return a.ss < b.ss;
    }

};
*/

/***********************************************************************************************************************/
const int siz = 7;
int n, m;
int k;
int c = 0;
char arr[siz][siz];
bool ac(vi &row, vi &col)
{
    vector<vector<bool> > vis(siz, vector<bool> (siz, false));
    int x = 0;
    for (int i = 0; i < row.size(); i++)
    {
        if (row[i])
        {
            for (int j = 0; j < m; j++)
            {
                if (!vis[i][j])
                {
                    vis[i][j] = true;
                    if (arr[i][j] == '#')
                        x++;
                }
            }
        }
    }
    for (int i = 0; i < col.size(); i++)
    {
        if (col[i])
        {
            for (int j = 0; j < n; j++)
            {
                if (!vis[j][i])
                {
                    vis[j][i] = true;
                    if (arr[j][i]=='#')
                        x++;
                }
            }
        }
    }
    //deb(x);
    return c - x == k;
}


signed main()
{
    int t = 1;

    // cin >> t;
    while (t--)
    {
        cin >> n >> m;

        cin >> k;

        for (int i = 0; i < n; i++)
        {
            for (int j = 0; j < m; j++)
            {
                cin >> arr[i][j];
                if (arr[i][j] == '#')
                    c++;
            }
        }
        //deb(c);
        if (k > c)
        {
            cout << 0 << endl; continue;
        }
        vector<vi> csubse, rsubse;
        for (int mask = 0; mask < (1 << n); mask++)
        {
            vi temp(n);
            for (int row = 0; row < n; row++)
            {
                if (mask & (1 << row))
                    temp[row] = 1;
            }
            rsubse.pb(temp);
        }
        for (int mask = 0; mask < (1 << m); mask++)
        {
            vi temp(m);
            for (int row = 0; row < m; row++)
            {
                if (mask & (1 << row))
                    temp[row] = 1;
            }
            csubse.pb(temp);
        }
        int ans = 0;
        for (int i = 0; i < rsubse.size(); i++)
        {
            for (int j = 0; j < csubse.size(); j++)
            {
                if (ac(rsubse[i], csubse[j])) {

                    ans++;
                }
            }
        }
        cout << ans << endl;
    }
}

Measured memory_bytes: 3204