#include <bits/stdc++.h>
using namespace std;
void maxi() {
  long long int n, sum = 0, i = 1, k = 0, prev = 0;
  cin >> n;
  while (1) {
    sum += (i * (i + 1)) / 2;
    if (sum > n) {
      break;
    }
    i++;
    k++;
  }
  cout << k << endl;
}
int main() {
  maxi();
  return 0;
}
