N, M, C = $stdin.readline.split(" ").map(&:to_i)
bs = $stdin.readline.split(" ").map(&:to_i)
n = 0
N.times.each do
  as = $stdin.readline.split(" ").map(&:to_i)
  sum = 0
  M.times do |i|
    sum += as[i] * bs[i]
  end
  sum += C
  if sum > 0
    n += 1
  end
end

puts n
