# frozen_string_literal: true

h, w, k = gets.split.map(&:to_i)
c = []
kuro = 0
h.times do
  l = gets.chomp.split('')
  kuro += l.count('#')
  c << l
end
hconb = [*(0...h)]
wconb = [*(0...w)]
res = 0

(0..h).each do |i|
  (0..w).each do |j|
   # memo = Array.new(h) { Array.new(w, 0) }
    hconb.combination(i).each do |arr|

    memo = Array.new(h) { Array.new(w, 0) }
      sum = 0
      arr.each do |raw|
        (0...w).each do |li|
          if c[raw][li] == '#' && memo[raw][li] != 1
            sum += 1
            memo[raw][li] = 1
          end
        end
      end
      tmp = sum
      wconb.combination(j).each do |ar|
 #       p "#{arr} #{ar}"
        sum = tmp
        ar.each do |line|
          (0...h).each do |ra|
            if c[ra][line] == '#' && memo[ra][line] != 1
              sum += 1
        #      memo[ra][line] = 1
            end
          end
        end
        res += 1 if (kuro - sum) == k
      end
    end
  end
end
puts res
