import Control.Monad
import Data.List
import Data.Maybe

main = do
  [d,g] <- map read . words <$> getLine                    :: IO [Int]
  pcs   <- map (map read . words) <$> replicateM d getLine :: IO [[Int]]
  print $ solve d g 1 0 0 0 0 pcs

solve d g i ui up a s [] = a + fromMaybe 1001 (inner ui up (g-s))
  where inner i p r = findIndex (>=r) $ map ((100*i)*) [0..p-1]
solve d g i ui up a s ([p,c]:pcs)
  = min (solve d g (i+1) ui up (a+p) (s+100*i*p+c) pcs) (solve d g (i+1) i p a s pcs)
