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>
def trial():
    num = int(input())
    levels = []
    for i in range(1, num + 1):
        counter = 0
        for j in range(i+1):
            counter += j
            if counter >= num:
                levels.append(counter)
                break
            elif counter < num and counter not in levels:
                levels.append(counter)
        if levels[-1] > num:
            break
    levels.pop(0)
    if len(levels) == 1:
        return print(1)
    res = 0
    counter = 0
    for i in levels:
        if res < num:
            counter += 1
            res += i
            if res > num:
                counter -= 1
                return print(counter)
        else:
            return print(counter)
    return print(counter)
trial()
