#include <bits/stdc++.h>
int main() {
  long int n, i, j, k, a, b, c, sum, ht;
  scanf("%ld", &n);
  i = 1;
  sum = 1;
  ht = 0;
  while (n > 0) {
    n = n - sum;
    sum = sum + i + 1;
    i++;
    if (n >= 0) {
      ht++;
    }
  }
  printf("%ld\n", ht);
}
