#P180. 【例30.1】 平方根

【例30.1】 平方根

Description

In mathematics, the square of a number xx is defined as x2=x×xx^2 = x × x. The square root of a positive number xx is defined as all values of yy that satisfy y×y=xy × y = x.
Step 1: Let the initial solution y0=1y_0 = 1;
Step 2: Let y1=y0+xy02y_1 = \frac{y_0 + \frac{x}{y_0}}{2}
Step 3: Let y2=y1+xy12y_2 = \frac{y_1 + \frac{x}{y_1}}{2}
Step 4: Let y3=y2+xy22y_3 = \frac{y_2 + \frac{x}{y_2}}{2}
...
Step n: Let yn=yn1+xyn12y_n = \frac{y_{n-1} + \frac{x}{y_{n-1}}}{2}
When this process is carried out infinitely, the result will infinitely approach the true value. Of course, a computer cannot execute an infinite loop, so we can only find an approximate solution.
Given the number xx for which we want to find the square root and the number of iterations nn, please use this algorithm to find the approximate value of the square root of xx.

Input Format

The first line contains two integers xx (1x1041≤x≤10^4) and nn (1n10001≤n≤1000), as described in the problem.

Output Format

Output the approximate value of the square root of xx, rounded to three decimal places.

Sample

4 10
2.000