x=int(eval(input()))

a=0

i=1

while a<x:

    a+=i

    if a>=x:

        print(i)

        exit()

    i+=1
x=int(eval(input()))

a=0

for i in range(1,10**9):

    a+=i

    if a>=x:

        print(i)

        exit()
x = int(eval(input()))
a = 0
i = 1
while a < x:
    a += i
    if a >= x:
        print(i)
        exit()
    i += 1

x = int(eval(input()))
a = 0
for i in range(1, 10**9):
    a += i
    if a >= x:
        print(i)
        exit()

-i = 1 -while a < x: +for i in range(1, 10**9): -    i += 1