#include <bits/stdc++.h>
using namespace std;
void Aya() {
  int n, diff = 2, sum = 1, sumdiff = 1, height = 1;
  cin >> n;
  while (sum < n) {
    sumdiff = (sumdiff + diff);
    sum += sumdiff;
    ++diff, ++height;
  }
  sum > n ? cout << height - 1 : cout << height;
}
int main() {
  { ios_base::sync_with_stdio(false); }
  { cin.tie(NULL); };
  int t = 1;
  while (t--) Aya();
}
