X = int(eval(input()))



i, x = 1, 0

while x < X:

    x += i

    i += 1

print((i - 1))
import math

X = int(eval(input()))

print((math.ceil((-1 + (1 + 8 * X) ** 0.5) / 2)))
X = int(eval(input()))
i, x = 1, 0
while x < X:
    x += i
    i += 1
print((i - 1))

import math

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

+import math + -i, x = 1, 0 -while x < X: -    x += i -    i += 1 -print((i - 1)) +print((math.ceil((-1 + (1 + 8 * X) ** 0.5) / 2)))