407378: GYM102780 B Mysterious Resistors
Description
When repairing an electronic board, Basil discovered that the board had already been under repair, and one of the resistors on it was replaced with a strange design. The design consisted of $$$k$$$ series of connected links, and each link in them — of two resistors connected in parallel.
Help Basil — write a program that calculates the value of the mysterious resistors from the total resistance of the circuit $$$R$$$, and the known values $$$r_1$$$, $$$r_2$$$, ..., $$$r_k$$$.
InputThe first line of the input data contains two integers $$$k$$$ ($$$1 \leq k \leq 1000$$$) and $$$R$$$ ($$$1 \leq R \leq 100000$$$), separated by a space.
The second line contains $$$k$$$ integers separated by spaces: $$$r_1$$$, $$$r_2$$$,..., $$$r_k$$$ ($$$1 \leq r_i \leq 100000$$$; $$$2R \leq r_1 + r_2 + \ldots + r_k$$$).
OutputThe program should output a single number — the estimated value of the mysterious resistors. The value must be outputed with an accuracy of $$$10^{-6}$$$.
ExamplesInput3 11 3 12 30Output
6.00000000Input
7 110 15 60 6 45 20 120 70Output
30.00000000Note
Recall that while connecting two resistors with the values of $$$R_1$$$ and $$$R_2$$$, the total resistance $$$R$$$ is calculated as $$$R = R_1 + R_2$$$ for the serial connection, and as $$$\dfrac{1}{R} = \dfrac{1}{R_1} + \dfrac{1}{R_2}$$$ for the parallel one.