#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i = 2, j, high = 0, Si = 1;
  scanf("%d", &n);
  while (n >= Si) {
    n -= Si;
    Si = i * (i + 1) / 2;
    high++;
    i++;
  }
  printf("%d\n", high);
  return 0;
}
