h, w, k = gets.split.map(&:to_i)
field = h.times.map {gets.chomp.chars}

num = 0

(1..h).each do |y_num|
  field.combination(y_num) do |rows|
    tmp = rows.transpose.map(&:join)
    (0..tmp.size).each do |x_num|
      tmp.combination(x_num) do |cols|
        co = 0
        cols.map {co += _1.count("#")}
        num += 1 if co == k
      end
    end
  end
end

puts num