def comb(n,k); k.times.inject(1) {|s,i| s * (n - i) / (i + 1) }; end

H, W, K = gets.split.map(&:to_i)
MAP = H.times.map{ gets.chomp }

def black(h,w)
  bc = 0
  H.times do |y|
    W.times do |x|
      bc += 1 if (h[y] > 0 || w[x] > 0) && MAP[y][x] == '#'
    end
  end
  bc
end

count = 0
(1 << H).times do |h|
  (1 << W).times do |w|
    count += 1 if black(h,w) == K
  end
end
puts count


