Fax McClad, Croneria's most festive bounty hunter, is hosting a big Christmas party in his neighbourhood! His neighbourhood can be thought of as a straight line.
Fax has crew members he can invite. The crew member is located metres to the east of the origin. He would like to invite some of his crew members to attend his party, but he wants to minimize the amount of time wasted. In particular, if the party is located metres to the east of the origin, then the crew member will waste time by going to the party.
Fax wants to invite all of his crew members to the party, but the total amount of time wasted might become too large. For each party size , what is the best location to host the party if Fax only invites the first crew members? In other words, what is the value of that minimizes:
Note: can be a real number.
Constraints
The absolute value of any coordinate will not exceed . That is, .
Subtask | Points | Additional Constraints |
---|---|---|
1 | 10 | for all |
2 | 10 | |
3 | 20 | |
4 | 60 | No additional constraints. |
Input Specification
The first line will contain the integer .
On the next lines, the line will contain the integer .
Output Specification
There will be lines of output. The line of output will contain the best location to host the party if the first of Fax's crew members are invited.
Your output will be judged as correct if the absolute error does not exceed .
Sample Input
4
2823
5748
3092
-14068
Sample Output
2822.999999
4285.500000
4108.776249
-2600.293020
Comments
Is an editorial ever going to be released for this problem?