#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int curr = 1, next = 2;
  int sol = 0;
  while (n >= 0) {
    if (n - curr >= 0) {
      n -= curr;
      curr += next;
      next++;
      sol++;
    } else
      break;
  }
  printf("%d\n", sol);
  return 0;
}
