// first second push_back unordered return continue break vector visited check flag bool while iterator begin end lower_bound upper_bound temp true false ll_MAX ll_MIN insert erase clear pop push compare ll64_MAX ll64_MIN  reverse replace stringstream string::npos length substr front priority_queue

#ifndef ONLINE_JUDGE
#include "debug.h"
#else
#include <bits/stdc++.h>
using namespace std;
#define debug(...) 42
#endif

#define endl '\n'
#define ll long long
#define rint register int
#define minpq priority_queue <int, vector<int>, greater<int> >
#define maxpq  priority_queue <int>

#define re register
#define pb(x) push_back(x);
#define ce(x) cout << x << '\n';

using db = long double;
using pll = pair < ll, ll >;
#define scan(a, n) 		for(int i = 0; i < n; i++)cin >> a[i];

#define rep(i,x,n,inc) for(i=x ; i<n ; i+=inc)
#define repr(i,x,n,inc) for( i=x ; i>n ; i+=inc)
#define all(a)      (a).begin(),(a).end()
#define unique_sort(x) sort(all(x)), x.resize(distance(x.begin(), unique(all(x))))

#define mp(a,b) make_pair(a,b)
#define ff first
#define ss second
#define hell 200007

ll t, i, x, j, y, m, 	z, k, n;
string s[7];
map<pair<map<ll, bool> , map<ll, bool> >, bool > memo;

void dfs(map<ll, bool> r, map<ll, bool> c) {
	ll t = 0;
	// if (memo.count(mp(r, c)))	return;
	rep(i, 0, n, 1) {
		if (r[i])	continue;
		rep(j, 0, m, 1) {
			if (c[j])	continue;
			t += s[i][j] == '#';
		}
	}
	// memo[mp(r, c)] = 1;
	if (t < k)	return;

	if (t == k) {
		// debug(r, c);
		z++;
	}

	rep(i, 0, n, 1) {
		if (r[i])	continue;
		r[i] = 1;
		rep(j, 0, m, 1) {
			if (c[j])	continue;
			c[j] = 1;
			debug(r, c, "both before");

			dfs(r, c);
			debug(r, c, "both after");
			c[j] = 0;
		}

		r[i] = 0;
	}

	rep(i, 0, n, 1) {
		if (r[i])	continue;
		r[i] = 1;
		dfs(r, c);
		r[i] = 0;
		debug(r, c, "row only");

	}

	rep(j, 0, m, 1) {
		if (c[j])	continue;
		c[j] = 1;
		dfs(r, c);
		c[j] = 0;
		debug(r, c, "col only");

	}
}

map<string , bool > eui;

ll  dfs(string s, ll dep = 0) {
	// if (eui.count(s))	return;
	eui[s] = 1;
	ll t = 0;

	rep(i, 0, n * m, 1)	t += s[i] == '#';
	if ( t == k) {
		z += 1;
		debug(s, "found");
	}

	if (t >= k) {
		string newS = "";
		newS = s.c_str();
		// rep(i, 0, n * m, 1)		newS += s[i];
		// debug(newS, "newS");

		rep(i, 0, n, 1) {
			ll cnt = 0;
			// ce(i)
			rep(j, i * m, i * m + m, 1)	cnt += s[j] == 'r';
			debug(cnt, i, dep);
			if (cnt != m) {
				rep(j, i * m, i * m + m, 1)	newS[j] = 'r';
				ll k = dfs(newS, dep + 1);
				rep(j, i * m, i * m + m, 1)	newS[j] = s[j];
				debug(newS, "row Only", i, dep);
			}
		}

		rep(j, 0, m, 1) {
			ll cnt = 0;
			rep(i, 0, n, 1)	cnt += s[i * m + j] == 'r';
			if (cnt != n) {
				// debug(newS, "col Only", j);

				rep(i, 0, n, 1) newS[i * m + j] = 'r';
				// debug(newS, "col Only", j);
				ll k = dfs(newS, dep + 1);
				rep(i, 0, n, 1) newS[i * m + j] = s[i * m + j];
			}
		}
	}
	return 0;
}

int32_t main() {
	ios::sync_with_stdio(0); 		cin.tie(0); cout.tie(0);

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

	cin >> n >> m >> k;
	string C[n];
	rep(i, 0, n, 1)	cin >> C[i];
	ll res = 0;

	for (int h = (0); h < (1 << n); h++) {
		for (int w = (0); w < (1 << m); w++) {
			int cnt = 0;
			for (i = (0); i < (n); i++) {
				if (((h) & (1 << (i)))) {
					int j;
					for (j = (0); j < (m); j++) {
						if (((w) & (1 << (j)))) {
							if (C[i][j] == '#') {
								cnt++;
							}
						}
					}
				}
			}
			if (cnt == k) {
				res++;
			}
		}
	}
	ce(res);
}

/*

AC x 3
WA x 1
TLE x 2
RE x 0

*/

Measured memory_bytes: 3628