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

using ll = long long;
const int AMAX = 1e5;
ll cnt[AMAX+1];

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