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