#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int ans = 0;
  int foo = 0;
  int temp = foo;
  for (int i = 1; foo < n; i++) {
    temp += i;
    foo += temp;
    if (foo <= n) ans++;
  }
  printf("%d\n", ans);
  return 0;
}
