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

int main(){
	using ll = long long;
	ll n, k;
	cin >> n >> k;
	map<ll, ll> m;
	while(n--){
		ll a, b;
		cin >> a >> b;
		m[a] += b;
	}
	ll sum = 0;
	for(auto itr:m){
		sum += itr.second;
		if(k <= sum){
			cout << itr.first << endl;
			return 0;
		}
	}
}