#K45742. Maximum Sales Sum

    ID: 27821 Type: Default 1000ms 256MiB

Maximum Sales Sum

Maximum Sales Sum

You are given the number of days N, a window size K, and a series of integers representing the sales on each day. Your task is to compute the maximum total sales over any K consecutive days.

Note: The input will be provided via standard input (stdin) and the output should be printed to standard output (stdout). Use efficient methods to handle the computation, as the array might be large.

inputFormat

The first line contains two integers N and K separated by a space, where N is the total number of days and K is the number of consecutive days to consider.

The second line contains N integers separated by spaces, representing the sales for each day.

outputFormat

Output a single integer which is the maximum sum of sales over any K consecutive days.

## sample
7 3
2 1 5 1 3 2 1
9