//                   ********** YATIN KWATRA **********

// AC BAKSHI RABBA

#include <bits/stdc++.h>
#define ll                      long long 
#define ld                      long double
#define ull                     unsigned long long 
#define FIO                     ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endl                    "\n"
#define fo(i,a,b)               for(int i = a; i<=b ; i++)
#define rfo(i,a,b)              for(int i = a; i>=b ; i--)
#define vii                     vector<int>
#define vll                     vector<ll>
#define pq                      priority_queue
#define uom                     unordered_map                
#define all(v)                  v.begin(),v.end()
#define mp                      make_pair
#define pb                      push_back
#define pob                     pop_back
#define ff                      first
#define ss                      second
#define pii                     pair<int,int> 
#define pll                     pair<long,long>
#define mll                     map<ll,ll>
#define mii                     map<int,int>
#define vvii                    vector<vii>
#define vvll                    vector<vll>
#define mod                     1000000007
#define pi                      3.1415926535897932384626433832795

using namespace std;

void INPUT() 
{  
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
}

/*
    
   -> Check For Overflows
   -> Out of Bounds
   -> Initialisations of global arrays and variables
   -> Its not Always Complex, Try to simplify
   -> write it down and try to solve
   -> Have Faith in urself and in ur approach
   -> If it seems totally out of reach, switch to next :)
   -> And Come Back later, if possible 
*/



int cnt,n,m,k;

ll f(vector<vector<char>> &v , int i, int j)
{
  if(i == n)
  {
    int val = 0;

    fo(i1,0,n-1)
    {
      fo(j1,0,m-1) 
      {
        if(v[i1][j1] == 'r') val++;
      }
    }
    cout << endl;

    if(val == k)
    {

     fo(i1,0,n-1)
     {
      fo(j1,0,m-1) 
      {
        cout << v[i1][j1] << " ";
      }
      cout << endl;
    }
    cout << endl;

      return 1LL;
    } 
    return 0LL;
  }


  ll op1 = 0, op2 = 0, op3 = 0;

  // paint row

  map<pii,bool>h;

  fo(p,0,m-1)
  {
    if(v[i][p] == '#') 
    {
      h[mp(i,p)] = 1;
      v[i][p] = 'r';
    }
  }

  int py = j+1,px = i;

  if(py == m)
  {
    py = 0;
    px = i+1;
  }


  if(px<n and !h.empty()) op1 = f(v,px,py);

  for(auto &i : h)
  {
    v[i.ff.ff][i.ff.ss] = '#';
  }

  // paint colmn

  h.clear();

  fo(p,0,n-1)
  {
    if(v[p][j] == '#') 
    {
      h[mp(p,j)] = 1;
      v[p][i] = 'r';
    }
  }


  if(px<n and !h.empty()) op2 = f(v,px,py);

  for(auto &i : h)
  {
    v[i.ff.ff][i.ff.ss] = '#';
  }

  h.clear();

  if(px<n) op3 = f(v,px,py);


  ll ans = op1 + op2 + op3;

  return ans;




}

void solve()
{ 
  
    cin >> n >> m >> k;

    vector<vector<char>> v(n+1,vector<char>(m+1));

    fo(i,0,n-1)
    {
      fo(j,0,m-1) cin >> v[i][j];
    }

    ll ans = 0LL;
    ll blck = 0;


    fo(i,0,(1<<n)-1)
    {
      fo(j,0,(1<<m)-1)
      {
        blck = 0;

        fo(p,0,n-1)
        {
          fo(q,0,m-1)
          {
            if(!(i&(1<<p)) and !(j&(1<<q)) and v[p][q] == '#') blck++;  
          }
        }

        if(blck == k) ans++;
      }
    }

    cout << ans << endl;
       
}
int main() {
    
    FIO
    INPUT();
    
    int t;
    t = 1;
  //  cin >> t;
    
    while(t--)
    {
       solve();
    }
    return 0;
}


Measured memory_bytes: 3664