#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int k = 1, l = 0, n;
  scanf("%d", &n);
  while (n - k >= 0) {
    l++;
    n -= k;
    k += (l + 1);
  }
  printf("%d", l);
}
