# frozen_string_literal: true

h, w, k = gets.split.map(&:to_i)
c = h.times.map { gets.chomp.chars }
def blacks(c)
  count = 0
  c.each do |e|
    count += e.count('#')
  end
  count
end
def ddup(a, b)
  a.each do |e|
    b.push e.dup
  end
  b
end
count = 0
(0..(2**h - 1)).each do |x|
  (0..(2**w - 1)).each do |y|
    cc = []
    ddup(c, cc)
    (0..(h - 1)).each do |i|
      cc[i] = [','] * w if x[i] == 1
      (0..(w - 1)).each do |j|
        cc[i][j] = ',' if y[j] == 1
      end
    end
    count += 1 if blacks(cc) == k
  end
end
puts count
