require 'matrix'

h, w, k = gets.split.map(&:to_i)
rows = Array.new(h){gets.chomp.chars.map{|c| (c == '#') ? 1 : 0}}
z = Matrix.zero(h, w)
cnt = 0
[0, 1].repeated_permutation(h).each do |x|
  m = Matrix.rows(rows.dup.shift(h))
  x.each_with_index do |y, i|
    next if y == 0
    w.times do |j|
      m[i, j] = 0
    end
  end
  [0, 1].repeated_permutation(w) do |u|
    mc = m.dup
    u.each_with_index do |v, j|
      next if v == 0
      h.times do |i|
        mc[i, j] = 0
      end
    end
    cnt += 1 if mc.sum == k
  end
end
puts cnt