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>
heights={1: 1, 2: 4, 3: 10, 4: 20, 5: 35, 6: 56, 7: 84, 8: 120, 9: 165, 10: 220, 11: 286, 12: 364, 13: 455, 14: 560, 15: 680, 16: 816, 17: 969, 18: 1140, 19: 1330, 20: 1540, 21: 1771, 22: 2024, 23: 2300, 24: 2600, 25: 2925, 26: 3276, 27: 3654, 28: 4060, 29: 4495, 30: 4960, 31: 5456, 32: 5984, 33: 6545, 34: 7140, 35: 7770, 36: 8436, 37: 9139, 38: 9880, 39: 10660}
n=int(input())
i=1
while(heights[i]<=n):
    i+=1
print(i-1)