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