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>
#stdin.readline()
#int(stdin.readline())
#stdout.write()
#raw_input()
#map(int,raw_input().split())
#map(int,stdin.readline().split())
def h():
    k,r=map(int,stdin.readline().split())
    for i in xrange(1,11):
        t=(k*i)%10
        if t==r or t==0:
            print i
            exit()
def g():
    a,b=map(int,stdin.readline().split())
    t=min(a,b)
    print t,max(0,a+b-2*t)//2
def f():
    n=input()
    z=[0]
    t=1
    l=1
    while z[l-1]<n:
        z.append(z[-1]+(l*(l+1))/2)
        l+=1
    z.append(z[-1] + (l * (l + 1)) / 2)
    for i in xrange(len(z)):
        if z[i]==n:
            print i
            exit()
        elif z[i]>n:
            print i-1
            exit()
def main():
    f()
if __name__ == "__main__":
    from sys import stdin, stdout
    main()