def red_to_row(cs, i)
  cs[i] = "x" * cs[i].size
end

def red_to_col(cs, i)
  cs.size.times do |j|
    cs[j] = cs[j][0...i] + "x" + cs[j][i+1...cs[j].size]
  end
end

def main
  h,w,k = gets.chomp.split(" ").map(&:to_i)
  cs = []
  h.times do
    line = gets.chomp
    cs.push line
  end
  ans = 0

  [0,1].repeated_permutation(h+w) do |combination|
    cs_copy = Marshal.load(Marshal.dump(cs))
    (0...h).each do |i|
      red_to_row(cs_copy, i) if combination[i] == 1
    end
    (h...h+w).each do |i|
      red_to_col(cs_copy, i-h) if combination[i] == 1
    end

    cnt = 0
    cs_copy.size.times do |i|
      cnt += cs_copy[i].count('#')
    end
    ans += 1 if cnt == k
  end
  puts ans
end

main

