h, w, k = gets.split.map(&:to_i)

c = []
h.times do
  c << gets.chomp
end

count = 0
(2 ** h).times do |i|
  i_str = sprintf("%0#{h}b", i)
  (2 ** w).times do |j|
    j_str = sprintf("%0#{w}b", j)


    black = 0
    i_str.each_char.with_index do |hi, iind|
      j_str.each_char.with_index do |wi, jind|
        black += 1 if hi == "0" && wi == "0" && c[iind][jind] == "#"
      end
    end
    count += 1 if black == k
  end
end
puts count