#!/usr/bin/ruby
# -*- coding: utf-8 -*-

while true
  n, k = gets.split.map(&:to_i)
  if n == 0 && k == 0
    break
  end
  a = []
  n.times do
    a << gets.to_i
  end

  res = []
  (n - k).times do|i|
    tmp = 0
    k.times do|j|
      tmp += a[i + j]
    end
    res << tmp
  end

  puts res.sort.reverse[0]
end