Option Explicit On
Option Strict On

Module Module1

    Sub Main()

        Dim tmp As String() = Split(Console.ReadLine(), " ")
        Dim N As Integer = CInt(tmp(0))
        Dim K As Integer = CInt(tmp(1))
        Dim itmp As String() = Split(Console.ReadLine(), " ")

        Dim max As Double = 0
        Dim wk As Double = 0

        For i As Integer = 0 To N - K
            For j As Integer = 0 To K - 1
                wk += (Double.Parse(itmp(i + j)) + 1) / 2
            Next
            If max < wk Then
                max = wk
            End If
            wk = 0
        Next

        Console.WriteLine(max)

    End Sub

End Module
