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