#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> A, B, C;
int main() {
  int n, cou = 0, h = 0;
  cin >> n;
  while (cou <= n) {
    ++h;
    cou += (h * (h + 1)) / 2;
  }
  cout << h - 1 << endl;
}
