#include <iostream> using namespace std; int main() { int n; int sum = 1, pre = 1, cur; cin >> n; int i = 2; while (1) { cur = pre * i; sum += cur; if (sum >= n) break; i++; pre = cur; } cout << i - 1 << endl; return 0; }