#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, c = 0;
  cin >> n;
  int i = 0;
  while (++i) {
    int sum = i * (i + 1) / 2;
    if (n - sum < 0)
      break;
    else {
      n -= sum;
      c++;
    }
  }
  cout << c << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
