"use strict"
function main(arg) {
    var k = Number(arg.trim().split("\n")[0].split(" ")[1])
    var b = arg.trim().split("\n")[1].split(" ").map(Number)
    var arr = new Array(b.length).fill(0)
    var arr2 = new Array(b.length).fill(0)
    for (var i = 0; i < b.length; i++) {
        arr[i] += (i + 1)
        if (i > 0) {
            arr[i] += arr[i-1]
        }
        arr2[i] = arr[i] / (i+1)
    }
    var data = []
    var max = 0
    for (var i = 0; i < b.length; i++) {
        if (i < k - 1) {
            continue
        }
        var value = 0
        var tmp = []
        for (var j = i - k + 1; j <= i; j++) {
            var arr2_index = b[j]
            value += arr2[arr2_index - 1] 
        }
        max = Math.max(value, max)
    }
    console.log(max)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));