N=int(input())

S=0
i=1
while True:
    S+=i
    if S>=N:
        exit(print(i))
    i+=1