#include<iostream>
#include<vector>
#include<map>
using namespace std;

int main(){
 long n,k; cin>>n>>k;
 map<long,long> mp;
 for(int i=0;i<n;i++){
  long a,b;cin>>a>>b;
  mp[a] += b;
}
long count = 0;
for(auto a : mp){
    count += a.second;
 if(count >= k){
  cout<<a.first<<endl;break;
}
}
 return 0;
}