Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tags yet

No tag edit access

F. Expected Earnings

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputYou are playing a game with a bag of red and black balls. Initially, you are told that the bag has *n* balls total. In addition, you are also told that the bag has probability *p*_{i} / 10^{6} of containing exactly *i* red balls.

You now would like to buy balls from this bag. You really like the color red, so red balls are worth a unit of 1, while black balls are worth nothing. To buy a ball, if there are still balls in the bag, you pay a cost *c* with 0 ≤ *c* ≤ 1, and draw a ball randomly from the bag. You can choose to stop buying at any point (and you can even choose to not buy anything at all).

Given that you buy optimally to maximize the expected profit (i.e. # red balls - cost needed to obtain them), print the maximum expected profit.

Input

The first line of input will contain two integers *n*, *X* (1 ≤ *n* ≤ 10 000, 0 ≤ *X* ≤ 10^{6}).

The next line of input will contain *n* + 1 integers *p*_{0}, *p*_{1}, ... *p*_{n} (0 ≤ *p*_{i} ≤ 10^{6}, )

The value of *c* can be computed as .

Output

Print a single floating point number representing the optimal expected value.

Your answer will be accepted if it has absolute or relative error at most 10^{ - 9}. More specifically, if your answer is *a* and the jury answer is *b*, your answer will be accepted if .

Example

Input

3 200000

250000 250000 250000 250000

Output

0.9000000000

Note

Here, there is equal probability for the bag to contain 0,1,2,3 red balls. Also, it costs 0.2 to draw a ball from the bag.

Codeforces (c) Copyright 2010-2017 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Aug/18/2017 05:55:52 (c2).

Desktop version, switch to mobile version.

User lists

Name |
---|