X = int(eval(input()))



i = 1

while((i ** 2 + i) / 2 < X):

  i += 1



print(i)
from math import ceil

x = int(eval(input()))

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

from math import ceil

x = int(eval(input()))
print((ceil(((1 + 8 * x) ** 0.5 - 1) / 2)))

-X = int(eval(input())) -i = 1 -while (i**2 + i) / 2 < X: -    i += 1 -print(i) +from math import ceil + +x = int(eval(input())) +print((ceil(((1 + 8 * x) ** 0.5 - 1) / 2)))