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.awt.Point;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;




		
public class TestClass   {

static long[] dis ;	
static int[] vis;
static  ArrayList<Integer>[] resu;
static int[] som;
static long max;
static long max2;

public static void disc(long max22 , ArrayList<Integer>[] paths,long max23){
	vis[(int) max22]=1;
	LinkedList<Integer> q = new LinkedList<Integer>();
	q.add((int) max22);
	
	while(!q.isEmpty()){
		
		int x = q.pop();
		// System.out.println(x);
		vis[x]=1;
		for(int i=0;i<paths[x].size();i++){
			   if(vis[paths[x].get(i)]!=1){
				dis[paths[x].get(i)]=1+ dis[x];
				 if( dis[paths[x].get(i)]>max){
					 
					  max= dis[paths[x].get(i)];
					  max2 = paths[x].get(i);
				  }
				 q.add(paths[x].get(i));
			   }
		}
	}
	

	
	
}



    public static void main(String args[] ) throws  IOException {  
      

     //  BufferedReader in = new BufferedReader(new FileReader("C:\\Users\\Sompathak\\Desktop\\yes.txt"));
//    Scanner in = new Scanner(new FileReader("C:\\Users\\Sompathak\\Desktop\\yes.txt"));
   //  PrintWriter pw = new PrintWriter(new FileWriter("C:\\Users\\Sompathak\\Desktop\\output.txt"));
 
Scanner in = new Scanner(new  InputStreamReader(System.in));
//Scanner in = new Scanner(new FileReader("C:\\Users\\Sompathak\\Desktop\\yes.txt"));
   
    int n =in.nextInt();
    int ans=0;
    int j=1;
    int x=0;
   // System.out.println(n);
   while(n>0){
	   ans+=j;
	   
	   n-=ans;
	   x++;
	   j++;
	   
   }
   if(n<0) x--;
   System.out.println(x);
    	  
    	
   // System.out.println(j);
  
   
 
    }
}
