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.io.*;
import java.util.*;
import java.util.stream.Stream;
public class Solution { 		// <- название класса туда
	static boolean IOtypeisFile=false; 	// <- ввод/вывод идёт в качестве файла? (если ввод/вывод файл-true, если консоль-false)
	static String FileInput="C:\\Users\\связной\\Downloads\\A-large-practice.in", //<- название файла-ввода туда
				  FileOutput="C:\\Users\\связной\\Desktop\\out.out";// <- название файла-вывода туда
	static Scanner in;
	static PrintStream out;
	private static String ts(Object a) {return String.valueOf(a);}
	private static int ti(String a) {return Integer.valueOf(a);}
	private static int[]    arrayI(int n) {int[] ans=new int[n];for(int i=0;i<n;i++){ans[i]=in.nextInt();}return ans;}
	private static String[] arrayS(int n) {String[] ans=new String[n];for(int i=0;i<n;i++){ans[i]=in.next();}return ans;}
	private static double[] arrayD(int n) {double[] ans=new double[n];for(int i=0;i<n;i++){ans[i]=in.nextDouble();}return ans;}
	public static void main(String[] args) {

		ts(arrayI(0));arrayS(0);arrayD(0);ti("3");
		if (IOtypeisFile) {
			File f =new File(FileInput);
			try {
				in=new Scanner(f); 
				out=new PrintStream(FileOutput);
			} catch (FileNotFoundException e) {System.err.println(e);}
		} else {
			in=new Scanner(System.in);
			out=new PrintStream(System.out);
		}
		run();
		in.close();
		out.close();
	}
	//Код пишут отсюда |
	//				   V
	private static void run(){
		int n=in.nextInt(),d=0;
		for (double i=1;true;i++) {
			d+=i*(i+1)/2;
			if (d>n) {out.println((int)i-1);return;}
		}
	}
}