# based on editorial

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

answer = 0

0.upto((1 << h) - 1) do |i|
  0.upto((1 << w) - 1) do |j|
    black = 0
    0.upto(h - 1) do |y|
      0.upto(w - 1) do |x|
        black += 1 if field[y][x] == '#' && i & (1 << y) == 0 && j & (1 << x) == 0
      end
    end
    answer += 1 if black == k
  end
end
puts answer
