#include<bits/stdc++.h>

#define zton(i,n) for(int i=0;i<=n;i++)
#define oneton(i,n) for(int i=1;i<=n;i++)
#define fo(i,n) for(int i=0;i<n;i++)
#define fab(i,a,b) for(int i=a;i<b;i++)
#define loop(i,b,a) for(int i=a;i>=b;i--)
#define dsort(arr,n) sort(arr, arr + n, greater<int>())
#define vsortd(a) sort(a.begin(), a.end(), greater<double>())
#define vsort(a) sort(a.begin(), a.end())
#define ll long long int
#define test int tc;cin>>tc;while(tc--)
#define dbg(x) cout<<#x<<'='<<(x)<<endl;
#define dbg2(x,y) cout<<#x<<'='<<(x)<<endl<<#y<<'='<<(y)<<endl;
#define dbg3(x,y,z) cout<<#x<<'='<<(x)<<endl<<#y<<'='<<(y)<<endl<<#z<<"="<<(z)<<endl;
#define dbg4(x,y,z,w) cout<<#x<<'='<<(x)<<endl<<#y<<'='<<(y)<<endl<<#z<<"="<<(z)<<endl<<#w<<"="<<(w);
#define minheap priority_queue <int, vector<int>, greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define pb push_back
#define ff first
#define ss second
#define mpr make_pair
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
#define mkv vector<int>
#define allzero(dp) memset(dp,0,sizeof(dp))
#define endl "\n"
#define print(x) cout<<x<<endl;

const int mod=998244353;
using namespace std;
bool sortcol( const vector<int>& v1,const vector<int>& v2 ) {return v1[1] < v2[1];}
typedef pair<int, int> pi;

void fastio()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
}

bool sortfun(const pair<ll,ll> &a,const pair<ll,ll> &b){
    return (a.ss>b.ss);
   // if(a.first==b.first)return a.second<b.second;
    //return false;
}

ll power(ll x, ll y){
    ll res = 1;x=x%mod;
    while(y>0){
        if(y&1)res=(res*x)%mod;
        y=y>>1;x=(x*x)%mod;}
    return res;
}


void subsetsUtil(vector<int>& A, vector<vector<int> >& res,
                 vector<int>& subset, int index)
{
    res.push_back(subset);
    for (int i = index; i < A.size(); i++) {

        // include the A[i] in subset.
        subset.push_back(A[i]);

        // move onto the next element.
        subsetsUtil(A, res, subset, i + 1);

        // exclude the A[i] from subset and triggers
        // backtracking.
        subset.pop_back();
    }

    return;
}

// below function returns the subsets of vector A.
vector<vector<int> > subsets(vector<int>& A)
{
    vector<int> subset;
    vector<vector<int> > res;

    // keeps track of current element in vector A;
    int index = 0;
    subsetsUtil(A, res, subset, index);

    return res;
}

void solve()
{
    int n,m,x;cin>>n>>m>>x;
    vector<int>an,am;
    fo(i,n)an.pb(i+1);
    fo(j,m)am.pb(j+1);
    vector<vector<int>>v1,v2;
    v1=subsets(an);
    v2=subsets(am);
    int mat[n][m];
    fo(i,n)
    {
        string s;cin>>s;
        fo(j,m)
        {
            if(s[j]=='.')mat[i][j]=0;
            else mat[i][j]=1;
        }
    }
    int cnt=0;
    fo(i,v1.size())
    {
        int dup[n][m];
        fo(j,n)fo(k,m)dup[j][k]=mat[j][k];
        fo(j,v1[i].size())
        {
            fo(k,m)dup[v1[i][j]-1][k]=0;
        }
        fo(j,v2.size())
        {
            int vm[n][m];
            fo(c,n)fo(d,m)vm[c][d]=dup[c][d];
            fo(z,v2[j].size())
            {
                fo(k,n)vm[k][v2[j][z]-1]=0;
            }
            int val=0;
            fo(c,n)fo(d,m)if(vm[c][d])val++;
            if(val==x)
            {
            //    fo(c,n)
              //  {
                //    fo(d,m)
                  //      cout<<vm[c][d]<<" ";cout<<endl;
               // }
               // cout<<endl;
                cnt++;
            }
        }
    }
    print(cnt)


}

int main()
{
   // fastio();
  //  test
    solve();
}


Measured memory_bytes: 3640