#include <bits/stdc++.h>
using namespace std;
int main() {
  float i, tsum = 0, linsum, a, n;
  cin >> a;
  for (i = 1; tsum <= a; i++) {
    n = i;
    linsum = ((n / 2) * (2 + (n - 1)));
    tsum += linsum;
    if (tsum > a) {
      cout << i - 1;
    }
  }
}
