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