x = int(eval(input()))

ans = 0

t = 0

d = 0



while x > d:

    t += 1

    d += t

    ans += 1



print(ans)
from math import ceil

x = int(eval(input()))

print((ceil((-1+(-1+8*x)**0.5)/2)))
x = int(eval(input()))
ans = 0
t = 0
d = 0
while x > d:
    t += 1
    d += t
    ans += 1
print(ans)

from math import ceil

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

+from math import ceil + -ans = 0 -t = 0 -d = 0 -while x > d: -    t += 1 -    d += t -    ans += 1 -print(ans) +print((ceil((-1 + (-1 + 8 * x) ** 0.5) / 2)))