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