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