#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int h = 0;
  int accu = 0;
  for (int i = 1; i <= n; i++) {
    accu += i;
    if (n >= accu) {
      n -= accu;
      h++;
    } else {
      break;
    }
  }
  cout << h << endl;
}
