#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  unsigned long long sum = 0;
  int counter = 0;
  while (true) {
    counter++;
    unsigned long long bfr = 0;
    for (int i = 1; i <= counter; i++) bfr += i;
    sum += bfr;
    if (sum > n) {
      cout << counter - 1;
      break;
    }
  }
  return 0;
}
