import sys



def solve():

    x = int(input())



    t = 1



    while calc_sum(t) < x:

        t += 1



    print(t)



def calc_sum(t):

    return t * (t + 1) // 2



def debug(x, table):

    for name, val in table.items():

        if x is val:

            print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)

            return None



if __name__ == '__main__':

    solve()

import sys



def solve():

    x = int(eval(input()))



    k = 0



    while k * (k + 1) // 2 < x:

        k += 1



    print(k)

    

if __name__ == '__main__':

    solve()
import sys


def solve():
    x = int(input())
    t = 1
    while calc_sum(t) < x:
        t += 1
    print(t)


def calc_sum(t):
    return t * (t + 1) // 2


def debug(x, table):
    for name, val in table.items():
        if x is val:
            print("DEBUG:{} -> {}".format(name, val), file=sys.stderr)
            return None


if __name__ == "__main__":
    solve()

import sys


def solve():
    x = int(eval(input()))
    k = 0
    while k * (k + 1) // 2 < x:
        k += 1
    print(k)


if __name__ == "__main__":
    solve()

-    x = int(input()) -    t = 1 -    while calc_sum(t) < x: -        t += 1 -    print(t) - - -def calc_sum(t): -    return t * (t + 1) // 2 - - -def debug(x, table): -    for name, val in table.items(): -        if x is val: -            print("DEBUG:{} -> {}".format(name, val), file=sys.stderr) -            return None +    x = int(eval(input())) +    k = 0 +    while k * (k + 1) // 2 < x: +        k += 1 +    print(k)