#include <iostream>
#define int long long
using namespace std;

int n, k;
int a, b;
int cnt[100001];

signed main() {
	int i;
	
	cin >> n >> k;
	for (i = 0; i < n; i++) {
		cin >> a >> b;
		cnt[a] += b;
	}
	
	int kosuu = 0;
	for (i = 0; i <= 100000; i++) {
		kosuu += cnt[i];
		if (kosuu >= k) {
			cout << i << endl;
			break;
		}
	}
	return 0;
}