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>
import java.util.*;
import java.io.*;

public class Cubes
{
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	static PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	
	public static void main(String[] args) throws IOException
	{
		// int[] n = {1, 4, 11, 26, 57, 120, 247, 502, 1013, 2036, 4083, 8178, 16369};
		int[] o = {1, 4, 10, 20, 35, 56, 84, 120, 165, 220, 286, 364, 455, 560, 680, 816, 969, 1140, 1330, 1540, 1771, 2024, 2300, 2600, 2925, 3276, 3654, 4060, 4495, 4960, 5456, 5984, 6545, 7140, 7770, 8436, 9139, 9880, 10660, 11480};
		
		pw.println(search(o, Integer.parseInt(br.readLine())));
		pw.close();
	}
	
	static int search(int[] n, int q)
	{
		int lo = 0;
		int hi = n.length-1;
		int mid = (lo+hi)/2;
		
		while(lo<=hi)
		{
			if(n[mid]==q)
				return mid+1;
			else if( n[mid] > q )
				hi = mid-1;
			else
				lo = mid+1;
			
			mid = (lo+hi)/2;
		}
		
		return mid+1;
	}
}