#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, cubes = 0, i, ans = 0;
  cin >> n;
  for (i = 1;; ++i) {
    cubes += i;
    ans += cubes;
    if (ans > n) break;
  }
  cout << i - 1 << "\n";
  return 0;
}
