#include <bits/stdc++.h>
using namespace std;
int number_of_cubes_for_n_length_pyramid(int n) {
  return (n * (n + 1) * (n + 2)) / 6;
}
int main() {
  int mylist[100];
  for (int i = 0; i < 100; i++) {
    mylist[i] = number_of_cubes_for_n_length_pyramid(i);
  }
  int n;
  cin >> n;
  int ans = 0;
  while (mylist[ans] <= n) {
    ans++;
  }
  cout << ans - 1 << "\n";
}
