#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int temp = 0, i = 1, count = 0;
  while (1) {
    temp = temp + i;
    n = n - temp;
    i++;
    count++;
    if (n == 0) {
      printf("%d", count);
      break;
    }
    if (n < 0) {
      printf("%d", count - 1);
      break;
    }
  }
}
