#include <bits/stdc++.h>
using namespace std;
int a[26];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int ans = 0;
  int curr = 0;
  int prev = 0;
  int i = 1;
  while (true) {
    prev += i;
    if (curr + prev > n) break;
    curr += prev;
    ++ans;
    ++i;
  }
  cout << ans;
  return 0;
}
