#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int numberOfCubes = 0;
    int level = 0;
    while (n >= numberOfCubes) {
      numberOfCubes = 0;
      level++;
      for (int i = 1; i <= level; i++) {
        numberOfCubes += i * (level - i + 1);
      }
    }
    cout << level - 1 << endl;
  }
  return 0;
}
