local h,w,k=io.read("n","n","n","l")
local c={}
for i=0,h-1 do
    local input=io.read()
    c[i]={}
    for j=0,w-1 do
        c[i][j]=input:sub(j+1,j+1)
    end
end

local total=0
for bi=0,(1<<h)-1 do
    for bj=0,(1<<w)-1 do
        local counter=0
        for i=0,h-1 do
            for j=0,w-1 do
                if (bi>>i)&1==0 and (bj>>j)&1==0 then
                    if c[i][j]=="#" then
                        counter=counter+1
                    end
                end
            end
        end
        if counter==k then
            total=total+1
        end
    end
end
print(total)