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