X = int(input())
A = 0
B = 0
for i in range(1, 10 ** 5):
    if A < X:
        A += i
    else:
        print(i - 1)
        exit()

a85256ff0d6ccba91cc836052437dfe9ac47b837
<mask token>

<mask token>
for i in range(1, 10 ** 5):
    if A < X:
        A += i
    else:
        print(i - 1)
        exit()

X = int(input())
A = 0
B = 0
for i in range(1, 10 ** 5):
    if A < X:
        A += i
    else:
        print(i - 1)
        exit()
