#include <bits/stdc++.h>
template <typename T>
using min_heap = std::priority_queue<T, std::vector<T>, std::greater<T>>;
template <typename T>
using max_heap = std::priority_queue<T, std::vector<T>, std::less<T>>;
using namespace std;
map<string, int> cnt;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int h = 0;
  int curr = 0;
  int last = 1;
  while (n > 0) {
    h++;
    curr += last;
    last++;
    n -= curr;
  }
  if (n < 0) h--;
  cout << h << endl;
  return 0;
}
