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

public class Main{
	private static BufferedReader in;
	private static BufferedWriter out;
	
	public static void main(String[] args) throws IOException {
		open();

		StringTokenizer st;
		StringBuilder sb;
	
		int n=readInt();
		int heigh=0;
		int total=0;
		while(total<=n) {
			heigh++;
			total+=(heigh*(heigh+1))/2;
		}
		out.write(heigh-1+"\n");
		
		close();
	}
	
	private static int[] readInts() throws IOException {
		return Stream.of(in.readLine().split(" ")).mapToInt(Integer::parseInt).toArray();
	}
	private static int readInt() throws IOException {
		return Integer.parseInt(in.readLine());
	}
	private static long[] readLongs() throws IOException {
		return Stream.of(in.readLine().split(" ")).mapToLong(Long::parseLong).toArray();
	}
	private static long readLong() throws IOException {
		return Long.parseLong(in.readLine());
	}
	private static double[] readDoubles() throws IOException {
		return Stream.of(in.readLine().split(" ")).mapToDouble(Double::parseDouble).toArray();
	}
	private static double readDouble() throws IOException {
		return Double.parseDouble(in.readLine());
	}
	private static String readString() throws IOException {
		return in.readLine();
	}
	private static int setBit(int S, int j) {
		return S | (1 << j);
	}
	private static int isOn(int S, int j) {
		return S & (1 << j);
	}
	private static int clearBit(int S, int j) {
		return S & ~(1 << j);
	}
	private static int toggleBit(int S, int j) {
		return S ^ (1 << j);
	}
	private static int lowBit(int S) {
		return S & (-S);
	}
	private static int setAll(int n) {
		return (1 << n) - 1;
	}
	private static int modulo(int S, int N) {
		return ((S) & (N - 1));
	} // returns S % N, where N is a power of 2
	private static boolean isPowerOfTwo(int S) {
		return (S & (S - 1)) == 0 ? true : false;
	}
	private static int nearestPowerOfTwo(int S) {
		return ((int) Math.pow(2.0, (int) ((Math.log((double) S) / Math.log(2.0)) + 0.5)));
	}
	private static int turnOffLastBit(int S) {
		return ((S) & (S - 1));
	}
	private static int turnOnLastZero(int S) {
		return ((S) | (S + 1));
	}
	private static int turnOffLastConsecutiveBits(int S) {
		return ((S) & (S + 1));
	}
	private static int turnOnLastConsecutiveZeroes(int S) {
		return ((S) | (S - 1));
	}
	private static void open() {
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new BufferedWriter(new OutputStreamWriter((System.out)));
	}
	private static void close() throws IOException {
		out.flush();
		out.close();
		in.close();
	}
}