import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

sys.setrecursionlimit(10 ** 7)



import itertools



x = int(read())

cumsum = list(itertools.accumulate([i for i in range(45000)]))

for i in range(45000):

    if cumsum[i] >= x:

        print(i)

        exit()

import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

sys.setrecursionlimit(10 ** 7)



x = int(read())

cnt = 0

for i in range(45000):

    cnt += i

    if cnt >= x:

        print(i)

        exit()

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**7)
import itertools

x = int(read())
cumsum = list(itertools.accumulate([i for i in range(45000)]))
for i in range(45000):
    if cumsum[i] >= x:
        print(i)
        exit()

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**7)
x = int(read())
cnt = 0
for i in range(45000):
    cnt += i
    if cnt >= x:
        print(i)
        exit()

-import itertools - -cumsum = list(itertools.accumulate([i for i in range(45000)])) +cnt = 0 -    if cumsum[i] >= x: +    cnt += i +    if cnt >= x: