#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int i = 1;
  int j = 2;
  int t = 0;
  while (n > 0) {
    n -= i;
    i += j;
    j++;
    if (n >= 0) t++;
  }
  cout << t;
}
