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