#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, r = 0, l = 0;
  cin >> n;
  while (r < n) {
    ++l;
    for (int i = 1; i <= l; ++i) {
      r += i;
    }
    if (r > n) --l;
  }
  cout << l;
  return 0;
}
