H,W,K = gets.split.map(&:to_i)
C = H.times.map{ gets.chomp }
ans = 0
all = (0...H).sum{|h| C[h].count("#")}

(0...2**H).each do |hh|
  counth = []
  (0...H).each{|h| (0...W).each{|w| counth << [h,w] if C[h][w] == "#"} if hh & 2**h != 0}
  (0...2**W).each do |ww|
    counthw = counth.clone
    (0...W).each{|w| (0...H).each{|h| counthw << [h,w] if C[h][w] == "#"} if ww & 2**w != 0}
    ans += 1 if counthw.uniq.size == (all - K)
  end
end

puts ans