let [| N; K |] = stdin.ReadLine().Split() |> Array.map int
let p = stdin.ReadLine().Split() |> Array.map int

let mutable m =
    p
    |> Array.take K
    |> Array.sum

let mutable t = m

for i in [ 1..N - K ] do
    t <- t + p.[i + K - 1] - p.[i - 1]
    m <- max t m

((m + K) |> float) / 2.0 |> stdout.WriteLine