def solve():

    X = int(eval(input()))

    sm = 0

    n = 0

    while sm < X:

        n += 1

        sm += n

    

    print(n)



if __name__ == '__main__':

    solve()
def solve():

    X = int(eval(input()))

    cnt = 0

    sm = 0

    while sm < X:

        sm += cnt + 1

        cnt += 1



    print(cnt)



if __name__ == '__main__':

    solve()
def solve():
    X = int(eval(input()))
    sm = 0
    n = 0
    while sm < X:
        n += 1
        sm += n
    print(n)


if __name__ == "__main__":
    solve()

def solve():
    X = int(eval(input()))
    cnt = 0
    sm = 0
    while sm < X:
        sm += cnt + 1
        cnt += 1
    print(cnt)


if __name__ == "__main__":
    solve()

+    cnt = 0 -    n = 0 -        n += 1 -        sm += n -    print(n) +        sm += cnt + 1 +        cnt += 1 +    print(cnt)