#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int counter = 0;
  int i = 1;
  while (n >= 0) {
    int a = (i * (i + 1)) / 2;
    i++;
    if ((n - a > 0) || (n - a == 0)) {
      counter++;
      n = n - a;
    } else
      break;
  }
  cout << counter << endl;
  return 0;
}
