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.math.*;
import java.text.*;

public class Main {
  static FastScanner in = new FastScanner(System.in);
  static StringBuilder sb = new StringBuilder();
  static DecimalFormat df = new DecimalFormat();
  public static void main(String[] args) {
    df.setMaximumFractionDigits(20);
    int n = in.nextInt();
    int i = 1;
    int blocks = 0;
    while (blocks <= n) {
      blocks += ((i + 1) * i) / 2;
      i++;
    }

    sb.append((i - 2) + "\n");
    System.out.print(sb.toString());
  }
  static BigInteger b(int n) { return BigInteger.valueOf(n);}
  static BigInteger b(String s) { return new BigInteger(s); }
}

class FastScanner {
  BufferedReader reader;
  StringTokenizer tokenizer;

  FastScanner (InputStream inputStream) {
    reader = new BufferedReader(new InputStreamReader(inputStream));
  }

  String nextToken() {
    while (tokenizer == null || ! tokenizer.hasMoreTokens()) {
      try {
        tokenizer = new StringTokenizer(reader.readLine());
      } catch (Exception e){}
    }
    return tokenizer.nextToken();
  }

  boolean hasNext() {
    if (tokenizer == null || ! tokenizer.hasMoreTokens()) {
      try {
        tokenizer = new StringTokenizer(reader.readLine());
      } catch (Exception e){ return false; }
    }
    return true;
  }

  int nextInt() {
    return Integer.parseInt(nextToken());
  }

  double nextDouble() {
    return Double.parseDouble(nextToken());
  }
}
