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