#include <bits/stdc++.h>
int main() {
  int n, c = 0, i, s = 0, j, k = 0;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= i; j++) {
      s = s + j;
      if (s > n) {
        k = 1;
        break;
      }
    }
    c = c + 1;
    if (k == 1) {
      c--;
      break;
    }
  }
  printf("%d", c);
}
