#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int num = 0, sum = 0, xx = 1;
  while (1) {
    num += xx;
    sum += num;
    if (sum > n) break;
    xx++;
  }
  printf("%d\n", --xx);
  return 0;
}
