x = int(eval(input()))

time = 0

leap = 0

while leap < x:

    time += 1

    leap += time

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



acc = 0

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

    acc += i

    if acc >= x:

        print(i)

        break
x = int(eval(input()))
time = 0
leap = 0
while leap < x:
    time += 1
    leap += time
print(time)

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

-time = 0 -leap = 0 -while leap < x: -    time += 1 -    leap += time -print(time) +acc = 0 +for i in range(1, x + 1): +    acc += i +    if acc >= x: +        print(i) +        break