#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int sum1 = 0, sum = 0, k = 0;
  for (int i = 1; i <= n; i++) {
    sum = sum + i;
    sum1 = sum1 + sum;
    if (sum1 <= n)
      k++;
    else
      break;
  }
  cout << k;
  return 0;
}
