Acsum=[]

acsum=0

for i in range(10**5):

  acsum+=i

  Acsum.append(acsum)

def binarysearch(x):

  ng=-1

  ok=10**5

  while abs(ok-ng)>1:

    mid=(ok+ng)//2

    if Acsum[mid]>=x:

      ok=mid

    else:

      ng=mid

  return ok

n=int(eval(input()))

print((binarysearch(n)))
Acsum=[]

acsum=0

for i in range(5*10**4):

  acsum+=i

  Acsum.append(acsum)

def binarysearch(x):

  ng=-1

  ok=5*10**4

  while abs(ok-ng)>1:

    mid=(ok+ng)//2

    if Acsum[mid]>=x:

      ok=mid

    else:

      ng=mid

  return ok

n=abs(int(eval(input())))

print((binarysearch(n)))

Acsum = []
acsum = 0
for i in range(10**5):
    acsum += i
    Acsum.append(acsum)


def binarysearch(x):
    ng = -1
    ok = 10**5
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if Acsum[mid] >= x:
            ok = mid
        else:
            ng = mid
    return ok


n = int(eval(input()))
print((binarysearch(n)))

Acsum = []
acsum = 0
for i in range(5 * 10**4):
    acsum += i
    Acsum.append(acsum)


def binarysearch(x):
    ng = -1
    ok = 5 * 10**4
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if Acsum[mid] >= x:
            ok = mid
        else:
            ng = mid
    return ok


n = abs(int(eval(input())))
print((binarysearch(n)))

-for i in range(10**5): +for i in range(5 * 10**4): -    ok = 10**5 +    ok = 5 * 10**4 -n = int(eval(input())) +n = abs(int(eval(input())))