h, w, n = gets.split(" ").map(&:to_i)
@data = h.times.map { gets.strip.split('') }
kuro = 0
cnt = 0

def kazoeru(h_bit, w_bit, kuro)
  h_bit.each_with_index do |h_s, h_index|
    w_bit.each_with_index do |w_s, w_index|
      next if w_s == 1 || h_s == 1
      kuro += 1 if @data[h_index][w_index] == "#"
    end
  end
  kuro
end
[0, 1].repeated_permutation(h) do |h_bit|
  [0, 1].repeated_permutation(w) do |w_bit|
    kuro = 0
    kuro = kazoeru(h_bit, w_bit, kuro)
    cnt += 1 if kuro == n
  end
end
   
puts cnt