#include <cstdio>
#define ll long long

int n;
ll m, table[100010];

int main(){
	int i, a, s;
	scanf("%d %lld", &n, &m);
	for(i = 0; i < n; i++){
		scanf("%d %d", &a, &s);
		table[a] += s;
	}
	for(i = 1; i <= 1e5; i++){
		if(m <= table[i]){ printf("%d", i); return 0; }
		m -= table[i];
	}
	return 0;
}