main
= readLn >>= \kolvo
-> let reshenie = najdiNuljEpt (\x -> 2*x*(x+1)*(x+2) - 12*kolvo) 1
najdiNuljEpt f
= (!!56) . iterate (\xi
-> xi
- f xi
/dfdx f xi
)
dfdx f x = (f (x+h) - f x)/h
h = 1/10^6
bWFpbiA9IHJlYWRMbiA+Pj0gXGtvbHZvIC0+IGxldAogICAgcmVzaGVuaWUgPSBuYWpkaU51bGpFcHQgKFx4IC0+IDIqeCooeCsxKSooeCsyKSAtIDEyKmtvbHZvKSAxCiAgICBpbiBwcmludCAoZmxvb3IgcmVzaGVuaWUpCiAgICAKbmFqZGlOdWxqRXB0IGYgPSAoISE1NikgLiBpdGVyYXRlIChceGkgLT4geGkgLSBmIHhpL2RmZHggZiB4aSkKCmRmZHggZiB4ID0gKGYgKHgraCkgLSBmIHgpL2gKaCA9IDEvMTBeNg==