#include <bits/stdc++.h>
int main() {
  int i, n, sum = 0, count = 0, t = 0;
  scanf("%d", &n);
  i = 1;
  while (t <= n) {
    sum = sum + i;
    t = t + sum;
    i++;
    count++;
  }
  printf("%d\n", count - 1);
  return 0;
}
