x = eval(input())

x = int(x)





def f(x):

    for n in range(0, x + 1):

        s = n * (n + 1) / 2

        if s >= x:

            return n





print((f(x)))

import sys



# sys.stdin = open('c1.in')





def f(x):

    for n in range(0, 10 ** 9):

        s = n * (n + 1) / 2

        if s >= x:

            return n





def f2(x):

    a = 0

    b = 10 ** 5

    while b - a > 1:

        n = (a + b) // 2

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

        if s >= x:

            b = n

        else:

            a = n

    return b



x = int(eval(input()))

print((f2(x)))



# for x in range(10 ** 9, 1, -10 ** 5):

#     if f(x) != f2(x):

#         print(x, f(x), f2(x))

#         break

x = eval(input())
x = int(x)


def f(x):
    for n in range(0, x + 1):
        s = n * (n + 1) / 2
        if s >= x:
            return n


print((f(x)))

import sys

# sys.stdin = open('c1.in')
def f(x):
    for n in range(0, 10**9):
        s = n * (n + 1) / 2
        if s >= x:
            return n


def f2(x):
    a = 0
    b = 10**5
    while b - a > 1:
        n = (a + b) // 2
        s = n * (n + 1) // 2
        if s >= x:
            b = n
        else:
            a = n
    return b


x = int(eval(input()))
print((f2(x)))
# for x in range(10 ** 9, 1, -10 ** 5):
#     if f(x) != f2(x):
#         print(x, f(x), f2(x))
#         break

-x = eval(input()) -x = int(x) +import sys - +# sys.stdin = open('c1.in') -    for n in range(0, x + 1): +    for n in range(0, 10**9): -print((f(x))) +def f2(x): +    a = 0 +    b = 10**5 +    while b - a > 1: +        n = (a + b) // 2 +        s = n * (n + 1) // 2 +        if s >= x: +            b = n +        else: +            a = n +    return b + + +x = int(eval(input())) +print((f2(x))) +# for x in range(10 ** 9, 1, -10 ** 5): +#     if f(x) != f2(x): +#         print(x, f(x), f2(x)) +#         break