x=int(eval(input()))



i=0

isum=0

while isum<x:

    i=i+1

    isum=isum+i



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



t=int(((-1+(8*x+1)**0.5)-10**(-10))/2)+1

print(t)

x = int(eval(input()))
i = 0
isum = 0
while isum < x:
    i = i + 1
    isum = isum + i
print(i)

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

-i = 0 -isum = 0 -while isum < x: -    i = i + 1 -    isum = isum + i -print(i) +t = int(((-1 + (8 * x + 1) ** 0.5) - 10 ** (-10)) / 2) + 1 +print(t)