H, W, K = gets.split(" ").map(&:to_i)
mtr = Array.new(H, [])

H.times do |i|
    mtr[i] = gets.chomp.split("").map{|c| c == "#"}
end

ans = 0
(0...(1 << H)).each do |hi|
    (0...(1 << W)).each do |wi|
        count = 0
        hi.each do |i|
            wi.each do |j|
                if mtr[i][j] && hi[i] != 0 && wi[j] != 0
                    count += 1
                end
            end
        end
        ans +=1 if count == K 
    end
end

puts ans