import Control.Monad

main = do
  [n,m,c] <- map read.words <$> getLine
  bs <- map read.words <$> getLine
  ass <- replicateM n $ map read.words <$> getLine
  print.length.filter ((>0).(+c).sum.zipWith (*) bs) $ ass