#include <bits/stdc++.h>
using namespace std;
int i, n, k, s, ss;
int main() {
  cin >> n;
  s = 1;
  while (n > 0) {
    for (i = 1; i <= s; i++) {
      ss = ss + i;
    }
    if (ss > n)
      break;
    else
      n = n - ss;
    s++;
    k++;
    ss = 0;
  }
  cout << k;
}
