### main

loop do
  n, k = gets.strip.split(' ').map{|s| s.to_i}
  break if (n | k) == 0

  i = 0
  sum = 0
  as = []

  while i < k
    ai = gets.strip.to_i
    as << ai

    sum += ai

    i += 1
  end

  max_sum = sum

  while i < n
    ai = gets.strip.to_i
    aj = as.shift
    as << ai

    sum += ai - aj
    max_sum = sum if max_sum < sum

    i += 1
  end

  puts max_sum
end