args = raw_input().split()
sarr = []
for i in range(int(args[0])):
        sarr.append(raw_input().split())

counter = 0
lim = int(args[1])

for i in sarr:
    counter += int(i[1])
    if(counter >= lim):
        print(int(i[0]))
        exit()
