"use strict"
const reducer = (accumulator, currentValue) => accumulator + currentValue;
function main(arg) {
    var k = Number(arg.trim().split("\n")[0].split(" ")[1])
    var b = arg.trim().split("\n")[1].split(" ").map(Number)

    var data = []
    var max = 0
    for (var i = 0; i < b.length; i++) {
        data.push(mean(b[i]))
        if (i < k - 1) {
            continue
        }
        var tmp = data.slice(i - k + 1, i + 1)
        var value = tmp.reduce(reducer)
        max = Math.max(value, max)
        // console.log(value)
        // console.log(b.slice(i - k + 1, i + 1))
    }
    console.log(max)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));

function mean(n) {
    var sum = 0
    for (var i = 1; i <= n; i++) {
        sum += i
    }
    return sum / n
}