h, w, s = gets.chomp.split(' ').map(&:to_i)
field = []
rows = []
black_count = 0
h.times do
  row = gets.chomp.split('')
  count_row = row.count('#')
  rows << count_row
  black_count += count_row
  field << row
end

cols = []
w.times do |i|
  count = 0
  h.times do |j|
    count += 1 if field[j][i] == '#'
  end
  cols << count
end

count = 0
(0...(1 << h)).each do |i|
  count_h = 0
  selected_h = []
  h.times do |j|
    if (i >> j) & 1 == 1
      count_h += rows[j]
      selected_h << j
    end
  end

  (0...(1 << w)).each do |k|
    count_w = 0
    selected_w = []
    w.times do |l|
      if (k >> l) & 1 == 1
        count_w += cols[l]
        selected_w << l
      end
    end
    overlap = 0
    selected_h.each do |hh|
      selected_w.each do |ww|
        overlap += 1 if field[hh][ww] == '#'
      end
    end
    count += 1 if black_count - (count_h + count_w - overlap) == s
  end
end
puts count