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