h, w, k = gets.split(' ').map(&:to_i)
css = Array.new(h, [])
h.times do |i|
  css[i] = gets.chomp.chars.map { |c| c == '#' }
end
res = 0
(0...(1 << h)).each do |hi|
  (0...(1 << w)).each do |wi|
    count = 0
    (0...h).each do |i|
      (0...w).each do |j|
        count += 1 if css[i][j] && hi[i] != 0 && wi[j] != 0
      end
    end
    res += 1 if count == k
  end
end
p res
