def cal(s)
  num = 0
  s.each do |i|
    num += i.count { |j| j == '#' }
  end
  num
end

h, w, k = gets.split.map(&:to_i)
C = []
num = 0
h.times do
  x = gets.chomp.split('')
  num += x.count { |a| a == '#' }
  C << x
end
ans = 0
(0..h - 1).each do |i|
  (0..w - 1).each do |j|
    sel_h = [*1..h].combination(i).to_a
    sel_w = [*1..w].combination(j).to_a
    sel_h.each do |x|
      z = C.dup
      x.each do |row|
        z[row-1] = Array.new(w,'r')
      end
      sel_w.each do |y|
        v = z.dup.transpose
        y.each do |row|
          v[row-1] = Array.new(h,'r')
        end
        ans += 1 if cal(v) == k
      end
    end
  end
end
puts ans