#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    int a[100];
    int i, sum = 1;
    a[0] = 1;
    if (n == 1) {
      printf("%d\n", a[0]);
    } else {
      for (i = 1;; i++) {
        a[i] = a[i - 1] + i + 1;
        sum += a[i];
        if (sum == n) {
          printf("%d\n", i + 1);
          goto drump;
        } else if (sum > n) {
          printf("%d\n", i);
          goto drump;
        }
      }
    drump:;
    }
  }
  return 0;
}
