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