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>
#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
long repeated_squaring(long base, long exp) {
  long result = 1;
  while (exp) {
    if (exp % 2) {
      result *= base;
    }
    base *= base;
    exp = exp /= 2;
  }
  return result;
}
vector<int> int_to_vector(long long num) {
  vector<int> v;
  while (1) {
    if (num == 0) {
      return v;
    }
    v.insert(v.begin(), num % 10);
    num /= 10;
  }
}
string replace_all(const string& message, const string& pattern,
                   const string& replace) {
  string result = message;
  string::size_type pos = 0;
  string::size_type offset = 0;
  int p_len = pattern.length();
  int r_len = replace.length();
  while ((pos = result.find(pattern, offset)) != string::npos) {
    result.replace(result.begin() + pos, result.begin() + pos + p_len, replace);
    offset = pos + r_len;
  }
  return result;
}
int max_continuos_sum(int* arr, int n) {
  int tss = arr[0];
  int mss = arr[0];
  for (int i = 1; i < n; i++) {
    tss = max(tss, 0) + arr[i];
    mss = max(tss, mss);
  }
  return mss;
}
int gcd(int a, int b) {
  int temp;
  while (b != 0) {
    temp = a % b;
    a = b;
    b = temp;
  }
  return a;
}
class jw {
 public:
  int st;
  int bo;
  jw() {}
  jw(int st, int bo) {
    this->st = st;
    this->bo = bo;
  }
  bool operator<(jw& a) { return this->st < a.st; }
  bool operator>(jw& a) { return this->st > a.st; }
  bool operator==(jw& a) { return this->st == a.st; }
  bool operator<=(jw& a) { return this->st <= a.st; }
  bool operator>=(jw& a) { return this->st >= a.st; }
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int i = 1, n, m, a = 0, b, cost = 0, temp, mi = 10000, ma = 0;
  cin >> n;
  while (1) {
    a += i;
    n -= a;
    if (n < 0) {
      break;
    }
    cost++;
    i++;
  }
  cout << cost << "\n";
  return 0;
}
