#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/rope>

using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define long long long 
#define PI 3.141592653589793238

#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")

#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
    template <typename Arg1>
    void __f(const char* name, Arg1&& arg1){
        cout << name << " : " << arg1 << endl;
        //use cerr if u want to display at the bottom
    }
    template <typename Arg1, typename... Args>
    void __f(const char* names, Arg1&& arg1, Args&&... args){
        const char* comma = strchr(names + 1, ','); cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
    }
#else
#define trace(...)
#endif

typedef trie<string,null_type,trie_string_access_traits<>,pat_trie_tag,trie_prefix_search_node_update> pref_trie;
typedef tree<long int,null_type,less<long int>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;
typedef cc_hash_table<long int,long int, hash<long int>, equal_to<long int>, direct_mask_range_hashing<long int>, 
hash_standard_resize_policy<hash_exponential_size_policy<>, hash_load_check_resize_trigger<true>, true>> ht;
typedef gp_hash_table<long int,long int> HashTable;

int main(){
   IOS;
 /*    #ifndef ONLINE_JUDGE
         freopen("in.txt",  "r",  stdin);
         freopen("out.txt", "w", stdout);
     #endif */
   
   long int n,m,k;
   cin>>n>>m>>k;

   vector<vector<char>> v(n,vector<char>(m));
   long int ans = 0;


   for(long int i = 0; i < n; i++)
   	 for(long int j = 0; j < m; j++)
   	 	cin>>v[i][j];

   long int ALL_ROWS = (1LL << n) - 1;
   long int ALL_COLS = (1LL << m) - 1;

   for(long int mask1 = 0; mask1 <= ALL_ROWS; mask1++){
   	for(long int mask2 = 0; mask2 <= ALL_COLS; mask2++){
   		vector<long int> removeRows, removeCols;

   		for(long int i = 0; i < n; i++)
   			if((mask1 >> i) & 1)
   				removeRows.push_back(i);

   		for(long int i = 0; i < m; i++)
   			if((mask2 >> i) & 1)
   				removeCols.push_back(i);
   	

   		for(long int i = 0; i < removeRows.size(); i++){
   			for(long int j = 0; j < m; j++){
   				if(v[removeRows[i]][j] == '.')
   					v[removeRows[i]][j] = 'x';
   				else if(v[removeRows[i]][j] == '#')
   					v[removeRows[i]][j] = '$';
   			}
   		}

   		for(long int i = 0; i < removeCols.size(); i++){
   			for(long int j = 0; j < n; j++){
   				if(v[j][removeCols[i]] == '.')
   					v[j][removeCols[i]] = 'x';
   				else if(v[j][removeCols[i]] == '#')
   					v[j][removeCols[i]] = '$';
   			}
   		}

   		long int cnt = 0;
   		for(long int i = 0; i < n; i++){
   			for(long int j = 0; j < m; j++){
   				if(v[i][j] == '#')
   					cnt++;
   			}
   		}

   		if(cnt == k)
   			ans++;
		
		for(long int i = 0; i < removeRows.size(); i++){
   			for(long int j = 0; j < m; j++){
   				if(v[removeRows[i]][j] == 'x')
   					v[removeRows[i]][j] = '.';
				else if(v[removeRows[i]][j] == '$')
					v[removeRows[i]][j] = '#';
   			}
   		}

   		for(long int i = 0; i < removeCols.size(); i++){
   			for(long int j = 0; j < n; j++){
   				if(v[j][removeCols[i]] == 'x')
   					v[j][removeCols[i]] = '.';
   				else if(v[j][removeCols[i]] == '$')
   					v[j][removeCols[i]] = '#';
   			}
   		}   		
   	}
   }

   cout<<ans;
   return 0;
}

Measured memory_bytes: 3656