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