mult :: [Int] -> [Int] -> Int
mult [] [] = 0
mult (a:as) (b:bs) = a*b+(mult as bs)

count :: Int -> Int -> [Int] -> IO Int
count 0 _ _  = return 0
count i c bs = do
  as <- map read.words <$> getLine
  n <- count (i-1) c bs
  if mult as bs > (-c) then return $ 1 + n
    else return n

main :: IO ()
main = do
  [n,m,c] <- map read.words <$> getLine
  bs <- map read.words <$> getLine
  ans <- count n c bs
  putStrLn $ show $ ans
