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