END { load __FILE__ unless $stdin.eof? }

h, w, k = gets.split.map!(&:to_i)
cells = Array.new(h) { gets.chomp.chars.map! { |c| c == '#' } }

def each_selection(ary, selected, &block)
  if ary.empty?
    block.call(selected)
    return
  end

  x = ary.pop
  each_selection(ary, selected, &block)
  selected << x
  each_selection(ary, selected, &block)
  selected.pop
  ary << x
end

cnt = 0
each_selection(cells, []) do |cells1|
  each_selection(cells1.transpose, []) do |cells2|
    cnt += 1 if cells2.flatten.count(true) == k
  end
end

puts cnt
