#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int count = 1;
  int count2 = 1;
  int i;
  for (i = 0; i < n; i++) {
    n -= count;
    if (n < 0) break;
    count2++;
    count += count2;
  }
  cout << i << endl;
  return 0;
}
