import Control.Monad

calc :: [Int] -> Int -> [Int] -> Bool
calc b c a = c + (foldl1 (+) $ zipWith (*) a b) > 0

main = do
  (n:m:c:_) <- map read . words <$> getLine
  b <- map read . words <$> getLine
  a <- replicateM n $ map read . words <$> getLine
  print $ length . filter (== True) $ map (calc b c) $ a
