import java.io.*;
import java.util.Scanner;
class Main
{
{
Scanner in
= new Scanner
(System.
in); long n = in.nextLong();
long x = 1;
long k = 1;
long s = 1;
while (s<n) {
k++;
x = x*2 + k;
s = s + x;
}
}
}
aW1wb3J0IGphdmEuaW8uKjsKaW1wb3J0IGphdmEudXRpbC5TY2FubmVyOwoKY2xhc3MgTWFpbgp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQlTY2FubmVyIGluID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKCQlsb25nIG4gPSBpbi5uZXh0TG9uZygpOwoJCWxvbmcgeCA9IDE7CgkJbG9uZyBrID0gMTsKCQlsb25nIHMgPSAxOwoJCXdoaWxlIChzPG4pIHsKCQkJaysrOwoJCQl4ID0geCoyICsgazsKCQkJcyA9IHMgKyB4OwoJCX0KCQlTeXN0ZW0ub3V0LnByaW50KGspOwoJfQp9