#include<cstdio>
#include<cstring>
#include<iostream>
#include<cmath>
#include<algorithm>

typedef long long ll ;

using namespace std;

ll arry[100005];

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