h, w, k = gets.split.map(&:to_i)
c = h.times.map {gets.chomp}

ans = 0
(1 << h).times do |i|
    (1 << w).times do |j|
        sum = 0
        h.times do |x|
            next if i[x] == 1

            w.times do |y|
                next if j[y] == 1
                sum += 1 if c[x][y] == ?#
            end
        end
        ans += 1 if sum == k
    end
end

p ans