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