#include <bits/stdc++.h>
int k, s, a[10010];
int main() {
  int n;
  a[0] = 0;
  s = 0;
  for (int i = 1;; i++) {
    s += i;
    a[i] = a[i - 1] + s;
    if (a[i] > 10000) {
      k = i;
      break;
    }
  }
  while (~scanf("%d", &n)) {
    for (int i = 1; i <= k; i++)
      if (a[i] > n) {
        printf("%d\n", i - 1);
        break;
      }
  }
  return 0;
}
