object Main {

  def main(args: Array[String]): Unit = {
    import scala.io.StdIn._
    val Array(n, k) = readLine().split(" ").map(_.toLong)
    val arr = new Array[Long](100001)

    (0 until n).map(_ => {
      val Array(a, b) = readLine().split(" ").map(_.toInt)
      (a, b)
    }).foreach { case (a, b) =>
      arr(a) += b
    }

    //

    var c = 0L
    (1 to 100000).foreach { i =>
      c += arr(i)
      if (c >= k) {
        println(i)
        return
      }
    }

  }

}