#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int cubos_en_fila = 1, fila = 1;
  while (n >= cubos_en_fila) {
    n -= cubos_en_fila;
    ++fila;
    cubos_en_fila += fila;
  }
  cout << fila - 1 << "\n";
  return 0;
}
