#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m = 1, a, t1 = 1, tong = 0;
  cin >> n;
  while (1) {
    tong += t1;
    if (tong > n) {
      cout << --m;
      return 0;
    }
    t1 += ++m;
  }
  return 0;
}
