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.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;


public class Template {
	
	public static void main(String[] args){
		Reader reader = new Reader(System.in);
		PrintWriter writer = new PrintWriter(new BufferedOutputStream(System.out));
		
		int cubes = reader.readInt();
		int level =0;
		int prevLevelCube =0;
		for(int i=1;i<Integer.MAX_VALUE;i++){
			prevLevelCube +=i;
			if(prevLevelCube<=cubes)
				cubes -=prevLevelCube;
			else{
				level = i-1;
				break;
			}
		}
		
		writer.println(level);
		
		writer.close();
	}
	
	public static class Reader{
		BufferedReader br;
		StringTokenizer st;
		public Reader(InputStream in){
			br = new BufferedReader(new InputStreamReader(System.in));			
		}
		
		private String read(){
			if(st==null || !st.hasMoreTokens()){
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			
			return st.nextToken();
		}
		
		public String readWord(){
			return read();
		}
		public long readLong(){
			return Long.parseLong(read());
		}
		public int readInt(){
			return Integer.parseInt(read());
		}
		public double readDouble(){
			return Double.parseDouble(read());
		}
		public float readFloat(){
			return Float.parseFloat(read());
		}
	}
}
