-- 解答を参考に書いた
local read = io.read
local lshift, rshift, band = bit.lshift, bit.rshift, bit.band
local H, W, K = read("*n", "*n", "*n")
read("*l")

local byte_sharp = string.byte("#")

local c = {}
for i = 1, H do
	local str = read("*l")
	c[i] = {}
	for j = 1, W do
		if byte_sharp == str:byte(j) then
			c[i][j] = true
		else
			c[i][j] = false
		end
	end
end


local out = 0
-- bitの利用
-- bitの数[0, (1<<H)-1]のような閉区間
for maskR = 0, lshift(1, H) - 1 do
	for maskC = 0, lshift(1, W) - 1 do
		local black = 0
		-- luaのlistは1からだからそれに合わせて[1, H]
		for i = 1, H do
			for j = 1, W do
				-- 0は塗りつぶしされてない
				if band(rshift(maskR, i - 1), 1) == 0
				and band(rshift(maskC, j - 1), 1) == 0
				and c[i][j] then
					black = black + 1
				end
			end
		end
		if black == K then
			out = out + 1
		end
	end
end

print(out)
