local read = setmetatable({}, {__index = function(t, k) local a = {} for i=1,#k do table.insert(a, '*'..string.sub(k, i, i)) end local r = io.read local u = table.unpack or unpack return function() return r(u(a)) end end})
read.N = function(N) local t={} for i=1,N do t[i]=read.n() end return t end
string.totable = function(s) local t={} local u=string.sub for i=1,#s do t[i] = u(s, i, i) end return t end
string.split = function(s) local t={} for w in string.gmatch(s, "[^%s]+") do table.insert(t, w) end return (table.unpack or unpack)(t) end
--
local H, W, K = read.nnnl()
local C = {}
for i=1,H do
    C[i] = read.l():totable()
end


local function getb(mh, mw)
    local b = 0
    for h=1,H do
        if mh & (1<<(h-1)) ~= 0 then
            for w=1,W do
                if mw & (1<<(w-1)) ~= 0 then
                    if C[h][w] == '#' then
                        b = b + 1
                    end
                end
            end
        end
    end
    return b
end

local c = 0
for mh=0,math.floor(2^H)-1 do
    for mw=0,math.floor(2^W)-1 do
        if getb(mh,mw) == K then
            c = c + 1
        end
    end
end
print(c)