#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int height = 0;
  cin >> n;
  int i = 1;
  while (n >= (i * (i + 1)) / 2) {
    n -= (i * (i + 1)) / 2;
    height = i;
    i++;
  }
  cout << height;
}
