#include <cstdio>

int main() {
	int h, w, k, count = 0;
	scanf("%d%d%d", &h, &w, &k);
	char grid[6][6];
	for (int i = 0; i < h; ++i)
		for (int j = 0; j < w; ++j)
			scanf(" %c", &grid[i][j]);
	for (int rows = 0; rows < 1 << h; ++rows) {
		for (int col = 0; col < 1 << w; ++col) {
			int bks = 0;
			for (int i = 0; i < h; ++i)
				for (int j = 0; j < w; ++j)
					if ((rows >> i) & 1 == 1 && (col >> j) & 1 == 1)
						bks += grid[i][j] == '#';
			if (bks == k) count++;
		}
	}
	printf("%d\n", count);
}
