let [|n;k|] = stdin.ReadLine().Split() |> Array.map int
let p = stdin.ReadLine().Split() |> Array.map float
let sum = p |> Array.map (fun x -> (x+1.0)/2.0)

let va l = sum.[l..(l+k-1)] |> Array.sum
let rec f i max = if i=n-k+1 then max
                  else
                    let value = va i
                    f (i+1) (Array.max [|max;value|])
f 0 0.0 |> stdout.WriteLine