#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  ;
  int n, h = 0, count = 0;
  cin >> n;
  while (count <= n) {
    h++;
    count += (h * (h + 1)) / 2;
  }
  cout << h - 1;
  return 0;
}
