X=int(eval(input()))

i=0

d=0

while d<X:

    i+=1

    d=i*(i+1)//2



print(i)
X=int(eval(input()))

d=0

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

    d+=i

    if d>=X:

        print(i)

        exit()
X = int(eval(input()))
i = 0
d = 0
while d < X:
    i += 1
    d = i * (i + 1) // 2
print(i)

X = int(eval(input()))
d = 0
for i in range(1, X + 1):
    d += i
    if d >= X:
        print(i)
        exit()

-i = 0 -while d < X: -    i += 1 -    d = i * (i + 1) // 2 -print(i) +for i in range(1, X + 1): +    d += i +    if d >= X: +        print(i) +        exit()