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