#include <bits/stdc++.h>
using namespace std;
int main() {
  int cc, now, cgsa, fi;
  cin >> cc;
  now = 0;
  fi = 0;
  cgsa = 0;
  while (now < cc) {
    cgsa++;
    fi += cgsa;
    now += fi;
  }
  if (now == cc)
    cout << cgsa;
  else
    cout << cgsa - 1;
  return 0;
}
