local n, k = io.read("*n", "*n")
local t = {}
for i = 1, 100000 do
  t[i] = 0
end
for i = 1, n do
  local a, b = io.read("*n", "*n")
  t[a] = t[a] + b
end
local sum = 0
for i = 1, 100000 do
  sum = sum + t[i]
  if k <= sum then print(i) break end
end