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