X = int(eval(input()))



total = 1

i = 1

while True:

  if total >= X:

    print(i)

    exit()

  else:

    i += 1

    total += i

  
import math

X = int(eval(input()))



ans = (-1 + (1+8*X)**0.5)/2

print((math.ceil(ans)))
X = int(eval(input()))
total = 1
i = 1
while True:
    if total >= X:
        print(i)
        exit()
    else:
        i += 1
        total += i

import math

X = int(eval(input()))
ans = (-1 + (1 + 8 * X) ** 0.5) / 2
print((math.ceil(ans)))

+import math + -total = 1 -i = 1 -while True: -    if total >= X: -        print(i) -        exit() -    else: -        i += 1 -        total += i +ans = (-1 + (1 + 8 * X) ** 0.5) / 2 +print((math.ceil(ans)))