zastave (COCI CONTEST_#5)
Time limit: 1 seconds | Memory limit: 512 MB | Task type: batch
Algorithms: geometry, optimization, parametric search, lagrange multipliers

## Task Zastave

After an exhausting day of preparing COCI, after sleeping for only three hours and in intervals of 20 minutes, and finally after naughty Patrick and Josip got on his nerves, Vito fell asleep.

Vito was always a pacifist and as a sign of his resignation in front of the disobedience of his (un)reliable friends, Vito dreamed of *n* white flags. The white flags had the shape of a right triangle swirling in the air with one of their sides parallel to the ground. In the morning, Vito could only remember a few key details... the length of the hypotenuse of the *i*-th flag was *r<sub>i</sub>* and the total sum of heights of the flags was at most *S*.

Now awake, he decided he shall fight on the beaches and never surrender! He rushed to the nearest paint shop so that next time he dreams of the *n* white flags he can paint them over! But he quickly realized, he isn't sure how much paint he has to buy. So he asked you to calculate the maximum possible total area of the *n* white flags satisfying the constraints!

## Input

The first line contains two integers, *n* and *S* (1 ≤ *n* ≤ 100000, 1 ≤ *S* ≤ 10^10), representing the number of flags and the maximum possible sum of the flag heights, respectively.

In the next line there are *n* integers *r<sub>i</sub>* (1 ≤ *r<sub>i</sub>* ≤ 100000).

## Output

In the only line, output the maximum possible sum of areas of the flags. Your solution will be considered correct if the absolute or relative error is smaller than 10<sup>-6</sup>.

## Scoring

| Subtask | Constraints | Restriction               |
|---------|-------------|----------------------------|
| 1       | 41          | *n* ≤ 100                |
| 2       | 22          | *n* ≤ 1000               |
| 3       | 47          | No additional constraints. |

## Examples

| input        | input         | input          |
|--------------|---------------|----------------|
| 2 3<br>4 5   | 1 6<br>10     | 4 7<br>5 5 6 6 |
| output       | output        | output         |
| 6.5200982141 | 24.0000000000 | 18.5706715170  |

#### Clarification of the second example

The largest possible area is achieved by a flag with sides 6, 8, and 10 and the total area is 24.

Starter code:

Grader code:

Setup script:

Evaluation script: