#D2116. Third Root
Third Root
Third Root
The solution of is to calculate the recurrence formula $ x_ {n + 1} = x_n-\ frac {x_ {n} ^ 3 --q} {3x_ {n} ^ 2} $ It can be calculated approximately with.
Put a positive number in
, $ x_3 = x_2-\ frac {x_ {2} ^ 3 --q} {3x_ {2} ^ Calculate as 2} $,….
While doing this calculation
When the value of becomes small enough, stop the calculation and use the last calculated as an approximate solution of .
Follow this method to create a program that outputs an approximation of the cube root of for the input positive integer . However, use to determine that it is "small enough".
input
Multiple datasets are given. For each dataset, () (integer) is given on one line. The end of the input is -1.
The number of datasets does not exceed 50.
output
Print (real number) on one line for each dataset. The output result may contain an error of 0.00001 or less.
Example
Input
15 15 -1
Output
2.466212 2.466212
inputFormat
outputFormat
outputs an approximation of the cube root of for the input positive integer . However, use to determine that it is "small enough".
input
Multiple datasets are given. For each dataset, () (integer) is given on one line. The end of the input is -1.
The number of datasets does not exceed 50.
output
Print (real number) on one line for each dataset. The output result may contain an error of 0.00001 or less.
Example
Input
15 15 -1
Output
2.466212 2.466212
样例
15
15
-1
2.466212
2.466212
</p>