//********************************************************************//
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define fi first 
#define se second 
#define RANGE(i, n) for (int i = 0; i < n; ++i)
#define FOR(i, a, b) for (int i = a; i < b; ++i)
#define DFOR(i, a, b) for(int i = a; i > b; --i)
#define DEB(x) cout << #x << ": " << x << endl
#define ALL(v) v.begin(), v.end() 
#define SORT(v) sort(ALL(v))
#define DISPV(v) { for(auto x___: v) cout << x___ << " "; cout << endl; }
#define DISPM(m) { for(auto x____: m){ cout << x____.first << ": " << x____.second << endl; } };
#define DISPMV(m) { for(auto x_____: m){ cout << x_____.first << ": " ;DISPV(x_____.second);} };
using LL = long long;
using VI = vector <int>;
using VC = vector <char>;
using VS = vector <string>;
using VL = vector <long long>;
using VVI = vector<VI>;
using VVL = vector <VL>;
using MII = map<int, int>;
using MIVI = map<int, VI>;
using MSS = map<string, string>;
using MLL = map<LL, LL>;
int READ_INT(){int temp;cin>>temp;return temp;}      // read an int
LL READ_LONG(){LL temp;cin>>temp;return temp;}      // read a long long
void mcs(VI &series, int &max_sum){                    // maximum contigous sub sum(kadane)
    int s=0;
    for(auto x: series){
        s += x;
        max_sum = max(max_sum, s);
        if(s < 0)s = 0;
    }
}
template<typename T>
T MAX(T t){ return t;}
template <typename T, typename... Args>
T MAX(T t, Args... args){ return max(t, MAX(args...)); }
const int MOD = int(1e9) + 7;
const int INF = 1e9 + 5;
const double PI = acos(-1.0); //M_PI;
const double EPS = 1e-9;
//********************************************************************//
 
int main(){
    ios::sync_with_stdio(false);
    //freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);

    int n, m, k;
    cin >> n >> m >> k;
    int grid[6][6];
    RANGE(i,6)RANGE(j,6)grid[i][j] = 1;

    for(int i = 0; i < n; ++i){
        string s;
        cin >> s;
        for(int j = 0; j < m; ++j)
            if(s[j] == '#')grid[i][j] = 0;
    }

    vector<bitset<6>>row_masks, col_masks;
    for(int i = 0; i < pow(2, n); ++i)row_masks.push_back(bitset<6>(i));
    for(int j = 0; j < pow(2, m); ++j)col_masks.push_back(bitset<6>(j));

    // cout << "original grid\n";
    // RANGE(i, 6){
    //     RANGE(j,6)cout << grid[i][j];
    //     cout << endl;
    // }cout << endl;

    // for(auto v: row_masks)cout << v << endl;
    // cout << endl;
    // for(auto v: col_masks)cout << v << endl;

    int ans = 0;
    for(auto row: row_masks){
        for(auto col: col_masks){
            int new_grid[6][6];
            RANGE(i,6)RANGE(j,6)new_grid[i][j] = grid[i][j];
            for(int i = 0; i < 6; ++i){
                for(int j = 0; j < 6; ++j){
                    if(row[i])new_grid[i][j] = 1;
                }
            }
            for(int i = 0; i < 6; ++i){
                for(int j = 0; j < 6; ++j){
                    if(col[j])new_grid[i][j] = 1;
                }
            }
            
            int blacks = 0;
            RANGE(i, n)RANGE(j,m)blacks += !new_grid[i][j];
            if(blacks == k)ans++;
            // if(blacks == k){
            //     cout << "black count: " << blacks << endl << endl;
            //     cout << "row mask: " << row << endl;
            //     cout << "col mask: " << col << endl;
            //     RANGE(i, 6){
            //         RANGE(j,6)cout << new_grid[i][j];
            //         cout << endl;
            //     }
            // }

        }
    }
    cout << ans << endl;

    return 0;
}



/* complie flags
-Wall -Wextra -pedantic -std=c++11 -O2 -Wshadow -Wformat=2 -Wfloat-equal -Wconversion -Wlogical-op -Wshift-overflow=2 -Wduplicated-cond -Wcast-qual -Wcast-align -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_FORTIFY_SOURCE=2 -fsanitize=address -fsanitize=undefined -fno-sanitize-recover -fstack-protector
*/

Measured memory_bytes: 3984