#!/usr/bin/env python3

n = int(eval(input()))

for i in range(10**5):

    if n <= i*(i+1)/2: 

        print(i)

        break

    
#!/usr/bin/env python3

n = int(eval(input()))

#for i in range(10**5):

for i in range(int((2*n)**(1/2))-1,int((2*n)**(1/2))+2) :

    if n <= i*(i+1)/2: 

        print(i)

        break
#!/usr/bin/env python3
n = int(eval(input()))
for i in range(10**5):
    if n <= i * (i + 1) / 2:
        print(i)
        break

#!/usr/bin/env python3
n = int(eval(input()))
# for i in range(10**5):
for i in range(int((2 * n) ** (1 / 2)) - 1, int((2 * n) ** (1 / 2)) + 2):
    if n <= i * (i + 1) / 2:
        print(i)
        break

-for i in range(10**5): +# for i in range(10**5): +for i in range(int((2 * n) ** (1 / 2)) - 1, int((2 * n) ** (1 / 2)) + 2):