def binary_patterns(size, patterns = [[true], [false]])
	return patterns if patterns[0].size == size
	ret = []
	patterns.each {|pattern|
		ret += binary_patterns(size, [pattern + [true]])
		ret += binary_patterns(size, [pattern + [false]])
	}
	ret
end

lines = $stdin.read.lines.map(&:chomp)
H, W, K = lines.shift.split(' ').map(&:to_i)
c = lines.map {|line| line.split(//) }
black = c.flatten.find_all {|x| x == '#' }.size

row_patterns = binary_patterns(H)
col_patterns = binary_patterns(W)

total = 0
row_patterns.each {|row|
	col_patterns.each {|col|
		red = 0
		0.upto(H - 1) {|i|
			0.upto(W - 1) {|j|
				red += 1 if (c[i][j] == '#') and (row[i] or col[j])
			}
		}
		total += 1 if black - red == K
	}
}
puts total
