let input = readLine()!.characters.split(" ").map{Int(String($0))!}
var arr = (0...100000).map{_ in 0}
for _ in 0..<input[0] {
  let input = readLine()!.characters.split(" ").map{Int(String($0))!}
  arr[input[0]] += input[1]
}
var tmp = input[1]
for i in 1...100000 {
  tmp -= arr[i]
  if tmp <= 0 {
    print(i)
    break
  }
}