There are N+2 steps on a staircase, with the first and last steps having the number 0, and each of the others labeled with one integer. A person standing on the first step can move up any number of steps as long as the number does not exceed K in one move.
Find the maximum sum this person can collect by reaching the last step, summing the numbers on the steps they touch.
The first line gives the integer n (0 ≤ n ≤ 1000). The second line contains n integers written on the steps, separated by spaces, each having an absolute value not exceeding 1000 (the first and last steps have a zero). The third line provides the maximum step length k (1 ≤ k ≤ n) the person can take.
Output a single number – the maximum sum the person can collect by reaching the last step.
Example 1