#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, total = 0, level = 0;
  cin >> n;
  while (total <= n) {
    level++;
    total += level * (level + 1) / 2;
  }
  cout << level - 1 << '\n';
}
