h, w, k = gets.split.map(&:to_i)
c = Array.new(h){gets.chomp.bytes}
cnt = 0
[0, 1].repeated_permutation(h).each do |x|
  m = Marshal.load(Marshal.dump(c))
  x.each_with_index do |y, i|
    if y == 1 then
      w.times do |j|
        m[i][j] = '.'.ord
      end
    end
  end
  [0, 1].repeated_permutation(w) do |u|
    mc = Marshal.load(Marshal.dump(m))
    u.each_with_index do |v, j|
      if v == 1
        h.times do |i|
          mc[i][j] = '.'.ord
        end
      end
    end
    cnt += 1 if mc.flatten.count('#'.ord) == k
  end
end
puts cnt