H, W, K = gets.split.map(&:to_i)
src = ''
masks = []
H.times { src.concat(gets.strip) }
v = src.tr('.#','01').to_i(2)

(1 << H).times do |row|
  (1 << W).times do |col|
    mask = 0
    H.times do |y|
      mask <<= W
      mask += if (((row >> y) & 1) == 1) then col else 0 end
    end
    masks << mask
  end
end

ans = 0
masks.uniq.each do |m|
  bits = 0
  c = (v & m)
  while c > 0 do
    bits += (c & 1)
    c >>= 1
  end
  ans += 1 if bits == K
end
puts ans