x=int(eval(input()))

n=1

while n*(n+1)//2<x:n+=1

print(n)
print((int((8*int(eval(input())))**.5+1)//2))
x = int(eval(input()))
n = 1
while n * (n + 1) // 2 < x:
    n += 1
print(n)

print((int((8 * int(eval(input()))) ** 0.5 + 1) // 2))

-x = int(eval(input())) -n = 1 -while n * (n + 1) // 2 < x: -    n += 1 -print(n) +print((int((8 * int(eval(input()))) ** 0.5 + 1) // 2))