# ARC070C - Go Home (ABC056C)

x = int(eval(input()))

for i in range(1, x + 1):

    if i * (i + 1) * 0.5 >= x:

        print(i)

        break
from math import ceil

x = int(eval(input()))

print((ceil((-1 + (8 * x + 1) ** 0.5) * 0.5)))
# ARC070C - Go Home (ABC056C)
x = int(eval(input()))
for i in range(1, x + 1):
    if i * (i + 1) * 0.5 >= x:
        print(i)
        break

from math import ceil

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

-# ARC070C - Go Home (ABC056C) +from math import ceil + -for i in range(1, x + 1): -    if i * (i + 1) * 0.5 >= x: -        print(i) -        break +print((ceil((-1 + (8 * x + 1) ** 0.5) * 0.5)))