from collections import defaultdict





# 初項a，交差dの数列n個の和

def arithmetic_series(a, d, n):

    return n * (2 * a + (n - 1) * d) // 2





def main():

    X = int(eval(input()))

    for i in range(10 ** 9):

        if X <= arithmetic_series(1, 1, i):

            print(i)

            return





if __name__ == '__main__':

    main()

from collections import defaultdict





def main():

    X = int(eval(input()))

    for i in range(0, X + 1):

        if (1 + i) * i // 2 >= X:

            print(i)

            return

    print(X)





if __name__ == '__main__':

    main()

from collections import defaultdict

# 初項a，交差dの数列n個の和
def arithmetic_series(a, d, n):
    return n * (2 * a + (n - 1) * d) // 2


def main():
    X = int(eval(input()))
    for i in range(10**9):
        if X <= arithmetic_series(1, 1, i):
            print(i)
            return


if __name__ == "__main__":
    main()

from collections import defaultdict


def main():
    X = int(eval(input()))
    for i in range(0, X + 1):
        if (1 + i) * i // 2 >= X:
            print(i)
            return
    print(X)


if __name__ == "__main__":
    main()

- -# 初項a，交差dの数列n個の和 -def arithmetic_series(a, d, n): -    return n * (2 * a + (n - 1) * d) // 2 -    for i in range(10**9): -        if X <= arithmetic_series(1, 1, i): +    for i in range(0, X + 1): +        if (1 + i) * i // 2 >= X: +    print(X)