"use strict";

const main = arg => {
    // 標準入力の不要な空白と改行を削除し、配列に格納する
    const input = arg.trim().split("\n");
    const N = input[0].split(" ")[0];
    const K = input[0].split(" ")[1];
    const p = input[1].split(" ").map(p => Math.floor(p));

    const add = (a, b) => a + b;
    const kitai = (a) => (a + 1) / 2;

    
    let maxArray = [0];
    let maxArraySum = 0;
    for (let i=0; i<N; i++) {
        let currentArray = [];
        for (let k=0; k<K; k++) {
            currentArray.push(p[i+k]);
        }
        if (currentArray.reduce(add) > maxArraySum) {
            maxArray = currentArray;
            maxArraySum = maxArray.reduce(add);
        }
    }
    console.log(maxArray.map(kitai).reduce(add));
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));  