if __name__ == '__main__':

    x = abs(int(eval(input())))



    s = 0

    for i in range(0,10 ** 9):

        if s > x: 

            print((i - 1))

            break

        elif s == x:

            print((i - 1))

            break

        s += i
if __name__ == '__main__':

    x = abs(int(eval(input())))



    s = 0

    for i in range(0,10 ** 9):

        if s >= x: 

            print((i - 1))

            break

        s += i
if __name__ == "__main__":
    x = abs(int(eval(input())))
    s = 0
    for i in range(0, 10**9):
        if s > x:
            print((i - 1))
            break
        elif s == x:
            print((i - 1))
            break
        s += i

if __name__ == "__main__":
    x = abs(int(eval(input())))
    s = 0
    for i in range(0, 10**9):
        if s >= x:
            print((i - 1))
            break
        s += i

-        if s > x: -            print((i - 1)) -            break -        elif s == x: +        if s >= x: