h,w,k = gets.chomp.split().map { |e|e.to_i }
list = Array.new(h).map { Array.new(w,0) }
for i in 0..h - 1 do
  list[i] = gets.chomp.split("")
end
count, ans = 0, 0
default = list.flatten.count("#")

for maskR in 0..(1 << h) - 1 do
  for maskC in 0..(1 << w) - 1 do
    count = 0
    for i in 0..h - 1 do
      for j in 0..w - 1 do
        if ((maskR >> i) & 1) == 0 && ((maskC >> j) & 1) == 0 && list[i][j] == '#'
          count += 1
        end
      end
    end
    if count == k
      ans += 1
    end
  end
end

puts ans
