#include <bits/stdc++.h>
using namespace std;
int X(int i) {
  int t = 0;
  for (int j = 1; j <= i; j++) t += j;
  return t;
}
int main() {
  int n, t = 0, i = 1;
  cin >> n;
  while (n - X(i) >= 0) {
    n -= X(i);
    t++;
    i++;
  }
  cout << t;
  return 0;
}
