def icroot(a):
c = a
b = 2*c//3+a//(3*c*c)
while (abs(b-c) >= 1) :
c = b
b = 2*c//3+a//(3*c*c)
return b
x =int(input())
y = icroot(x)
print(y)
ZGVmIGljcm9vdChhKToKICAgIGMgPSBhCiAgICBiID0gMipjLy8zK2EvLygzKmMqYykKICAgIHdoaWxlIChhYnMoYi1jKSA+PSAxKSA6CiAgICAJYyA9IGIKICAgIAliID0gMipjLy8zK2EvLygzKmMqYykKICAgIHJldHVybiBiCiAgICAKeCA9aW50KGlucHV0KCkpCnkgPSBpY3Jvb3QoeCkKCnByaW50KHkpCgo=