#include <iostream>
#define SUM_LIMIT 100001
using namespace std;

int main() {
  long int N, K, a, b, Answer = 0, sum[SUM_LIMIT] = {0}, i;
  cin >> N >> K;
  for (i = 0; i < N; i++) {
    cin >> a >> b;
    sum[a] += b;
  }
  for (i = 0; K > 0; i++) {
    K -= sum[i];
  }
  cout << i - 1 << endl;
  return 0;
}