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 = cols.map {_1.count("#")}.sum
        num += 1 if co == k
      end
    end
  end
end
 
puts num