#include<iostream>
using namespace std;
typedef long long ll;
ll backet[100001];
int main() {
	ll n, k,num,roop,sum=0;
	cin >> n >> k;
	for (int i = 0; i < n; i++) {
		cin >> num >> roop;
		backet[num] += roop;
	}
	for (int i = 1; i < 100001; i++) {
		sum += backet[i];
		if (sum >= k) {
			cout << i << endl;
			break;
		}
	}
	return 0;
}