Vanya got n cubes. He decided to build a pyramid from them. Vanya wants to build the pyramid as follows: the top level of the pyramid must consist of 1 cube, the second level must consist of 1 + 2 = 3 cubes, the third level must have 1 + 2 + 3 = 6 cubes, and so on. Thus, the i-th level of the pyramid must have 1 + 2 + ... + (i - 1) + i cubes.

Vanya wants to know what is the maximum height of the pyramid that he can make using the given cubes.

Input

The first line contains integer n (1 ≤ n ≤ 104) — the number of cubes given to Vanya.

Output

Print the maximum possible height of the pyramid in the single line.

Examples

Input

1


Output

1


Input

25


Output

4

Note

Illustration to the second sample: 

<image>
from sys import stdin, stdout, stderr, setrecursionlimit
setrecursionlimit(100000)

def debug (*e):
    if not __debug__:
        print(*e, file=stderr)

def dd(*vals):
    import inspect, re
    frame = inspect.getframeinfo(inspect.stack()[1][0])
    vs = re.search("dd\((.+)\)", frame.code_context[0]).group(1).split(",")
    if vs:
        debug(",".join("{0} = {1}".format(vs[i], v) for i,v in enumerate(vals)))

def trace(f):
    def traced(*args, **kw):
        debug("calling {} with args {}, {}".format(f.__name__, args, kw))
        return f(*args, **kw)
    return traced
#@trace
#def f(x):

def read():
    return stdin.readline().rstrip()

def readarr(sep=None, maxsplit=-1):
    return read().split(sep, maxsplit)

def readint():
    return int(read())

def readia(sep=None, maxsplit=-1):
    return [int(a) for a in readarr(sep, maxsplit)]

#write(1, 2, 3, sep="-", end="!")
def write(*args, **kwargs):
    sep = kwargs.get('sep', ' ')
    end = kwargs.get('end', '\n')
    stdout.write(sep.join(str(a) for a in args) + end)

#writea([1, 2, 3], sep="-", end="!")
def writea(arr, sep=' ', end='\n'):
    stdout.write(sep.join(str(a) for a in arr) + end)

n = readint()
lvl = 1
t = 1
while t <= n:
    dd(t, n, lvl)
    lvl += 1
    n -= t
    t = lvl*(lvl+1)//2
write(lvl-1)
