# ABC056 C - Go Home

X = int(eval(input()))



T = []

total = 0

idx = 0

ans = 0



while total < 2500000000:

    idx += 1

    total += idx

    T.append(total)



for i in range(len(T)-1):

    if i == 0:

        if X == T[i]:

            ans = i+1

            break

    if T[i-1]<X<=T[i]:

        ans = i+1

        break

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

if x==1:

  print((1))

  exit(0)

for i in range(1,100001):

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

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

  if t<x<=s:

    print((i+1))

    exit(0)
# ABC056 C - Go Home
X = int(eval(input()))
T = []
total = 0
idx = 0
ans = 0
while total < 2500000000:
    idx += 1
    total += idx
    T.append(total)
for i in range(len(T) - 1):
    if i == 0:
        if X == T[i]:
            ans = i + 1
            break
    if T[i - 1] < X <= T[i]:
        ans = i + 1
        break
print(ans)

x = int(eval(input()))
if x == 1:
    print((1))
    exit(0)
for i in range(1, 100001):
    t = i * (i + 1) // 2
    s = (i + 1) * (i + 2) // 2
    if t < x <= s:
        print((i + 1))
        exit(0)

-# ABC056 C - Go Home -X = int(eval(input())) -T = [] -total = 0 -idx = 0 -ans = 0 -while total < 2500000000: -    idx += 1 -    total += idx -    T.append(total) -for i in range(len(T) - 1): -    if i == 0: -        if X == T[i]: -            ans = i + 1 -            break -    if T[i - 1] < X <= T[i]: -        ans = i + 1 -        break -print(ans) +x = int(eval(input())) +if x == 1: +    print((1)) +    exit(0) +for i in range(1, 100001): +    t = i * (i + 1) // 2 +    s = (i + 1) * (i + 2) // 2 +    if t < x <= s: +        print((i + 1)) +        exit(0)