#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c = 1, l = 1, a = 2;
  cin >> n;
  n--;
  if (n < 0) cout << 0;
  while (n - (c + a) >= 0) {
    c += a;
    n -= c;
    a++;
    l++;
  }
  cout << l << endl;
  return 0;
}
