#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, ans = 0;
  cin >> n;
  int s = 1;
  int j = 2;
  while (n >= s) {
    n = n - s;
    s += j;
    j++;
    ans++;
  }
  cout << ans;
}
