object Main extends App {
	val scan = new java.util.Scanner(System.in)
	val ns: Array[Long] = Array.fill(1e5.toInt + 100)(0l)
	val n, k = scan.next().toInt
	for (_ <- 1 to n) yield ns(scan.next().toInt) += scan.next().toInt
	var cnt = 0l
	for (i <- 0 to ns.length) {
		cnt += ns(i)
		if (cnt >= k) {
			println(i)	
			sys.exit(0)	
		}
	}
}