X = int(eval(input()))

t = 1

max_t = (t* (t+1)) // 2



# t=1で1 t=2で 2,3 t= 3で 4, 5, 6  t=4で 7,8,9,10  t=5で 11,12,13,14,15までいける



while max_t < X:

    

    t += 1 

    max_t = (t* (t+1)) // 2

    

print(t)
x = int(eval(input()))

check = 0

for i in range(1, 1+x):

  check += i

  if check >= x:

    print(i)

    break

X = int(eval(input()))
t = 1
max_t = (t * (t + 1)) // 2
# t=1で1 t=2で 2,3 t= 3で 4, 5, 6  t=4で 7,8,9,10  t=5で 11,12,13,14,15までいける
while max_t < X:
    t += 1
    max_t = (t * (t + 1)) // 2
print(t)

x = int(eval(input()))
check = 0
for i in range(1, 1 + x):
    check += i
    if check >= x:
        print(i)
        break

-X = int(eval(input())) -t = 1 -max_t = (t * (t + 1)) // 2 -# t=1で1 t=2で 2,3 t= 3で 4, 5, 6  t=4で 7,8,9,10  t=5で 11,12,13,14,15までいける -while max_t < X: -    t += 1 -    max_t = (t * (t + 1)) // 2 -print(t) +x = int(eval(input())) +check = 0 +for i in range(1, 1 + x): +    check += i +    if check >= x: +        print(i) +        break