#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, counter = 0, minus = 1;
  cin >> n;
  int i = 2;
  while (n >= minus) {
    n -= minus;
    counter++;
    minus += i;
    i++;
  }
  cout << counter;
}
