import Control.Monad

list = [[3,500], [5,800]]

plusScore = zipWith (:) [100,200..]

scorePerQ [score,n,bonus] = f n
  where
    f 0 = []
    f x = if x == n
          then [(x,x*score+bonus)] ++ f (x-1)
          else [(x,x*score)]       ++ f (x-1)

allCombination = concat . map scorePerQ . plusScore

solve g list = minimum . f 0 0 $ allCombination list
  where
    f _ _ [] = []
    f n sumScore (x:xs)
      | g <= sumScore = [n]
      | otherwise = f (n+(fst x)) (sumScore+(snd x)) xs ++ f n sumScore xs

main = do
  [d,g] <- map read . words <$> getLine
  list <- replicateM d $ map read . words <$> getLine
  putStrLn $ solve g list
