#include<cstdio>
const int MAX = 100000;

int main() {
	int N;
	long long K;
	scanf("%d %lld\n", &N, &K);

	long long num[MAX+1] = {0};

	int a, b;
	for (int i = 0; i < N; i++) {
		scanf("%d %d", &a, &b);

		num[a] += b;
	}

	for (int i = 1; i <= MAX; i++) {
		K -= num[i];

		if (K <= 0) {
			printf("%d\n", i);
			break;
		}
	}
}
