X = int(eval(input()))

t = 1

while True:

    if X<=((t+1)*t)//2:

        break

    t += 1

print(t)

X = int(eval(input()))

k = 1

while (k*(k+1))//2<X:

    k += 1

print(k)
X = int(eval(input()))
t = 1
while True:
    if X <= ((t + 1) * t) // 2:
        break
    t += 1
print(t)

X = int(eval(input()))
k = 1
while (k * (k + 1)) // 2 < X:
    k += 1
print(k)

-t = 1 -while True: -    if X <= ((t + 1) * t) // 2: -        break -    t += 1 -print(t) +k = 1 +while (k * (k + 1)) // 2 < X: +    k += 1 +print(k)