#include <bits/stdc++.h>
int main() {
  int a, i, c = 0, s = 0, x = 0;
  scanf("%d", &a);
  for (i = 1; i <= a; i++) {
    s = s + i;
    x = x + s;
    if (x > a) break;
    c++;
  }
  printf("%d\n", c);
  return 0;
}
