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

p
|> Array.map (fun x -> (float(x)+1.0)/2.0)
|> Array.scan (+) 0.0
|> Array.windowed (K+1)
|> Array.map (fun arr -> arr.[K]-arr.[0])
|> Array.max
|> stdout.WriteLine