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