#include <bits/stdc++.h>
using namespace std;
int main() {
  int i = 1, q = 2, x, t = 0, c = 0;
  cin >> x;
  for (t = 0; t <= x; t += i, i += q, q++) {
    c++;
  }
  cout << c - 1 << endl;
  return 0;
}
