import qualified Data.Map as M
import Control.Monad
 
ix :: Int -> [(Int,Int)] -> Int
ix i [] = 0
ix i ((a,b):xs)
  | i < b = a
  | otherwise = ix (i-b) xs
 
main :: IO ()
main = do
  [n,k] <- map read . words <$> getLine
  is <- replicateM n $ map read . words <$> getLine
  let kon = foldr (\[a,b] m -> M.unionWith (+) m $ M.singleton a b) M.empty is
  print $ ix (k-1) $ M.toAscList kon