#include <bits/stdc++.h>
using namespace std;
const int MAX = 100000;
using ll = long long;

int main()
{
	ll N, K, a, b;
	cin >> N >> K;
	vector<ll> cnt(MAX + 1);
	while (N--) {
		cin >> a >> b;
		cnt[a] += b;
	}
	ll c = 0;
	for (int i = 1; i <= MAX; i++) {
		c += cnt[i];
		if (c >= K) {
			cout << i << endl;
			break;
		}
	}
	return 0;
}
