line = function()
	local t = {}
	string.gsub(io.read(),"(%S+)", function (v) table.insert(t,tonumber(v)) end)
	return t[1], t[2]
end

N, K = line()

cnt = {}

for i = 1, 100000 do
	cnt[i] = 0	
end

for i = 1, N do
	a, b = line()
	cnt[a] = cnt[a] + b
end

index = 0

for i = 1, 100000 do
	index = index + cnt[i]
	if index >= K then
		print(i)
		break
	end
end

