#include <bits/stdc++.h>
using namespace std;
int main() {
  int t(1);
  while (t--) {
    int n, i(1), count(0), cubes(0);
    cin >> n;
    while (1) {
      cubes += i;
      n -= cubes;
      if (n >= 0) {
        count++;
        i++;
      } else
        break;
    }
    cout << count;
  }
}
