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