import java.util.*;
import java.lang.*;
import java.io.*;
class Ideone
{
public static void main
(String[] args
) { int startSum = 1;
int years = 1;
int k = 1;
int currentSum = startSum;
Scanner scanner
= new Scanner
(System.
in); int sum = scanner.nextInt();
while (currentSum < sum){
years++;
k = k*2 + years;
currentSum += k;
}
}
}
CmltcG9ydCBqYXZhLnV0aWwuKjsKaW1wb3J0IGphdmEubGFuZy4qOwppbXBvcnQgamF2YS5pby4qOwoKY2xhc3MgSWRlb25lCnsKCSBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKSB7CiAgICAgICAgaW50IHN0YXJ0U3VtID0gMTsKICAgICAgICBpbnQgeWVhcnMgPSAxOwogICAgICAgIGludCBrID0gMTsKICAgICAgICBpbnQgY3VycmVudFN1bSA9IHN0YXJ0U3VtOwoKICAgICAgICBTY2FubmVyIHNjYW5uZXIgPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwogICAgICAgIGludCBzdW0gPSBzY2FubmVyLm5leHRJbnQoKTsKICAgICAgICB3aGlsZSAoY3VycmVudFN1bSA8IHN1bSl7CiAgICAgICAgICAgIHllYXJzKys7CiAgICAgICAgICAgIGsgPSBrKjIgKyB5ZWFyczsKICAgICAgICAgICAgY3VycmVudFN1bSArPSBrOwogICAgICAgIH0KICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oeWVhcnMpOwogICAgfQp9