# frozen_string_literal: true

h, w, k = readline.strip.split.map(&:to_i)

grid = (0...h).map { readline.strip }

ans = 0
(0...(1 << h)).each do |i|
  (0...(1 << w)).each do |j|
    c = 0
    (0...h).each do |k|
      (0...w).each do |l|
        if grid[k][l] == '#' && ((i >> k) & 1).zero? && ((j >> l) & 1).zero?
          c += 1
        end
      end
    end
    ans += 1 if c == k
  end
end

puts ans
