function Main(input) {
    input = input.trim().split("\n").map(function(x) { return x.split(" ")});
    var finishedLine = 0;
    while (true){
        var n = parseInt(input[0 + finishedLine][0], 10);
        var k = parseInt(input[0 + finishedLine][1], 10);
        if ((n + k) === 0) break;
        var vec_a = [];
        var vec_s = [0];
        for (var i = 0; i < n; i++){
            vec_a.push(parseInt(input[i + 1 + finishedLine][0], 10));
            vec_s.push(vec_s[i] + vec_a[i]);
        }
        finishedLine += n + 1;
        var ans = -10000 * k;
        for (var i = 0; i <= (n - k); i++){
            ans = Math.max(ans, vec_s[i + k] - vec_s[i])
        }
        console.log(ans);
    }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8")); 
