B. Pumpkin Purchase
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

You are in charge of buying a pumpkin to carve into a jack-o'-lantern for your suite's Halloween decorations! After performing extensive research at the nearby supermarket, you've realized that the supermarket generally charges more for larger pumpkins, but the relationship is complicated: you've fit a cubic curve relating price $$$p$$$ of the pumpkin to its volume:

$$$$$$V(p) = a_0 p^3 + a_1 p^2 + a_2 p + a_3$$$$$$

for some positive constants $$$a_i$$$ you've calculated from the data.

A good-looking jack-o'-lantern must be carved from a pumpkin of volume at least $$$V_T$$$. Given $$$V_T$$$, what's the cheapest price you'll have to pay to acquire a sufficiently-large pumpkin?

Input

The only line of input contains five space-separated real numbers $$$V_T$$$, $$$a_0$$$, $$$a_1$$$, $$$a_2$$$, and $$$a_3$$$. These numbers might be expressed in scientific notation (see sample inputs) and are all in the range $$$\left[ 10^{-9}, 10^9\right]$$$.

Output

Print the smallest value of $$$p$$$ for which $$$V(p) \geq V_T$$$. Your answer will be judged correct if it differs from the judge's solution by absolute or relative error at most $$$10^{-6}$$$.

Examples
Input
100.0 1.0 2.0 3.0 4.0
Output
3.8137429654598236083984375
Input
1e9 1e-9 1e-9 1e-9 1e-9
Output
999999.666666418313980102539062
Input
1.21419e-07 1571.28 12923.4 6.86914e+07 2.14303e+06
Output
2.98023223876953125e-08
Note

Hint: in order to satisfy the above error bound, be sure to print many digits of $$$p$$$ (at least 8).

For example, if your answer is stored in ans:

  • Java: System.out.printf("%.10f%n", ans);
  • C++: cout << fixed << setprecision(10) << ans << '\n'; (include <iomanip>)
  • Python: print(f"{ans:.10f}")