#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <map>
#include <algorithm>  // std::unique
#include <cmath>
#include <limits.h>
#include <queue>
#include <unordered_map>
#include <sstream>      // std::ostringstream
#include <bitset>
#include <iomanip>
#include <functional>
#include <set>


#define _USE_MATH_DEFINES
#include <math.h>
using namespace std;

using ll = long long;
constexpr auto PrimeBigNum10_9_7 = 1000000007;
const long long INF = 1LL << 60;

#define OUTPUT_DEBUG_LOG

template <typename T>
void DisplayAnswer(const T& v) {
	cout << v << endl;
}
template <typename T>
void DisplayAnswers(const vector<T>& vs) {
	for (const auto& v : vs) {
		cout << v << endl;
	}
}

template <typename T>
void DisplayAnswerOneLine(const vector<T>& vs) {
	for (const auto& v : vs) {
		cout << v << ' ';
	}
	cout << endl;
}


std::vector<std::string> split(const std::string &str, char sep)
{
	std::vector<std::string> v;
	std::stringstream ss(str);
	std::string buffer;
	while (std::getline(ss, buffer, sep)) {
		v.push_back(buffer);
	}
	return v;
}



template<class T>
void chmin(T& a, T b) {
	if (a > b) {
		a = b;
	}
}


// 素数判定
template <typename T>
bool IsPrimeNumber(T value) {

	for (int i = 2; i * i <= value; ++i) {
		if ((value % i) == 0) {
			return true;
		}
	}
	return false;
}

// 桁数判定
template <typename T>
T GetFigureLength(T value) {
	T figure = 1;
	while (value >= 10) {
		value /= 10;
		++figure;
	}
	return figure;
}

// 素因数分解結果
template <typename T>
map<T, T> GetPrimeFactorize(T value) {

	map<T, T> res;

	for (T i = 2; i * i <= value; ++i) {
		if ((value%i) != 0)	continue;

		T count = 0;
		while ((value % i) == 0) {
			value /= i;
			++count;
		}

		res[i] = count;
	}

	if (value != 1) {
		res[value] = 1;
	}
	return res;
}


void DebugPrint(const vector<ll>& vec) {
	cout << "{";
	for (auto itr = vec.begin(); itr != vec.end(); ++itr) {
		cout << *itr << ",";
	}
	cout << "}" << endl;
}

// valueが2のx乗以下である計算
ll calc2x(ll value) {
	ll n = 0;
	while (value > 0) {
		value /= 2;
		++n;
	}
	return n;
}



struct Vec2 {
	double x;
	double y;

	void rotate(double rad) {
		double s = sin(rad);
		double c = cos(rad);
		double tmpX = this->x*c - this->y*s;
		double tmpY = this->x*s + this->y*c;
		this->x = tmpX;
		this->y = tmpY;
	}
};

void FuncA() {
	ll m;
	cin >> m;

	while (m > 0) {
		m -= 1000;
	}
	DisplayAnswer(-m);
}

void FuncB() {
	unordered_map<string, int> map;

	map["AC"]=0;
	map["WA"] = 0;
	map["TLE"] = 0;
	map["RE"] = 0;

	ll n;
	cin >> n;
	while (n--) {
		string str;
		cin >> str;
		map[str]++;
	}

	cout << "AC x " << map["AC"] << endl;
	cout << "WA x " << map["WA"] << endl;
	cout << "TLE x " << map["TLE"] << endl;
	cout << "RE x " << map["RE"] << endl;
}
namespace C {
	ll map[6][6] = {};
	int calcSum(bitset<6> bh, bitset<6>bw) {
		ll sum = 0;
		for (ll i = 0; i < 6; ++i) {
			if (bh[i] == 0)	continue;
			for (ll j = 0; j < 6; ++j) {
				if (bw[j]) {
					sum += map[i][j];
				}
			}
		}
		return sum;

	}

	int CalcFuncC() {
		ll H, W, K;
		cin >> H >> W >> K;
		ll mapHs[6] = {};

		ll black = 0;
		for (ll i = 0; i < H; ++i) {
			for (ll j = 0; j < W; ++j) {
				char c;
				cin >> c;
				map[i][j] = (c == '#') ? 1 : 0;
				black += map[i][j];
				mapHs[i] += map[i][j];
			}
		}
		ll hMax = 1 << H;
		ll wMax = 1 <<W;

		ll answer = 0;
		for (ll i = 0; i < hMax; ++i) {
			bitset<6> bh = i;
			ll n = 0;
			for (ll k = 0; k < 6; ++k) {
				if (bh[k]) {
					n += mapHs[k];
				}
			}
			if (n < K)	continue;

			for (ll j = 0; j < wMax; ++j) {
				ll sum = calcSum(bh, j);
				if (sum == K) {
					bitset<6> bw = j;
					answer++;
				}
			}
		}

		return answer;

	}
}

void FuncC() {
	DisplayAnswer(C::CalcFuncC());
}
int main(void) {

	FuncC();

	return 0;
}


Measured memory_bytes: 3640