#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, sum = 0, count = 0, sum1 = 0;
  cin >> n;
  i = 1;
  while (sum1 <= n) {
    sum = sum + i;
    sum1 = sum1 + sum;
    count++;
    i++;
  }
  cout << count - 1 << endl;
}
