X = int(eval(input()))

for i in range(1, 10**6):

    if X <= 0.5 * i * (i + 1):

        print(i)

        break
X = int(eval(input()))



ans = 0

check = 0

for i in range(1, 10**7):

    ans += i

    check += 1

    if X <= ans:

        print(check)

        break
X = int(eval(input()))
for i in range(1, 10**6):
    if X <= 0.5 * i * (i + 1):
        print(i)
        break

X = int(eval(input()))
ans = 0
check = 0
for i in range(1, 10**7):
    ans += i
    check += 1
    if X <= ans:
        print(check)
        break

-for i in range(1, 10**6): -    if X <= 0.5 * i * (i + 1): -        print(i) +ans = 0 +check = 0 +for i in range(1, 10**7): +    ans += i +    check += 1 +    if X <= ans: +        print(check)