#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main(){
  ll n, k; cin >> n >> k;
  vector<ll> num(100001,0);
  for(int i = 0; i < n; i++){
    ll a, b; cin >> a >> b;
    num[a] += b;
  }
  for(int i = 1; i < 100001; i++){
    k -= num[i];
    if(k <= 0){
      cout << i << endl;
      break;
    }
  }
}