import java.io.{BufferedOutputStream, BufferedReader, InputStreamReader, PrintWriter}

object Main {
  def main(args: Array[String]): Unit = {
    val in = new BufferedReader(new InputStreamReader(System.in))
    val out = new PrintWriter(new BufferedOutputStream(System.out))
    val Array(n, k) = in.readLine().split("\\s+").map(_.toInt)

    val abs = (for {
      _ <- 0 until n
    } yield {
      in.readLine().split("\\s+").map(_.toInt) match {
        case Array(a, b) => (a, b)
      }
    }).sortWith {
      case ((a1, _), (a2, _)) => a1 < a2
    }

    var count = 0L
    out.println(
      abs.dropWhile {
        case (_, b) =>
          if (count + b >= k) {
            false
          } else {
            count += b
            true
          }
      }.head._1
    )

    out.flush()
  }
}
