#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
long long a[N], t, n, h = 1;
void lqq() {
  for (long long i = 1; i < 40; i++) {
    a[h++] = a[i - 1] + (1 + i) * i / 2;
  }
}
signed main() {
  lqq();
  cin >> n;
  for (long long i = 1; i <= h - 1; i++) {
    if (a[i] <= n && a[i + 1] > n) {
      cout << i;
      break;
    }
  }
}
