CSES - Aalto Competitive Programming 2024 - wk3 - Wed - Wario kart II
  • Time limit: 1.00 s
  • Memory limit: 512 MB

Uolevi is playing Wario kart again. The racing track contains n boost pads numbered 0,1,\dots,n-1. The cars move normally at speed 100\ m/s but the i-th pad multiplies the car's speed by a_i for one second if a player chooses to use it. The player can not pick up other boosts while one is in effect. After the boost ends, a player can also not use the next k boost pads they pass. The i-th pad lies at distance 100 \times i meters from the starting line. The finishing line lies at distance 100 \times n meters.

Last time Uolevi blue-shelled Maija so bad she isn't coming over to play any time soon. Uolevi is left to play alone and he is trying to finish the track as fast as possible. Help him find the theoretical fastest time achievable. Note that the track is not considered to be cyclic.

Input

The first line contains two integers n and k. The second line contains n integers a_0,\,a_1,\dots,\,a_{n-1}.

Output

Print the minimum time required to finish the track in seconds. The answer is considered correct if the error is less than 10^{-3}.

Constraints

  • 1 \leq n \leq 10^5
  • 0 \leq k \leq 100
  • 2 \leq a_i \leq 10^5
  • All input values are integers

Example 1

Input:

5 1
3 2 2 2 2 

Output:

2.5

Explanation:

Uolevi picks boosts 0 and 4

Example 2

Input:

4 0
2 2 2 2 

Output:

2

Example 3

Input:

10 2
2 4 5 3 2 31 71 5 2 4

Output:

4.16129032258064516115