Construction
Watson needs to construct most effective neural network. He is provided with a board containing N chips; chips are located in a line at distance 1 cm from each other. Each chip has its own performance, expressed by an integer. Watson is able to construct any number of neurons using these chips; every chip can be used not more than in one neuron. Neuron can be obtained by connecting two chips, which are located at distance M cm one from another. Effectiveness of a neuron is a sum of performances of chips it consists of. Effectiveness of neural network is a sum of effectivenesses of neurons. Neural network can contain any number of neurons, even 0.
Input
The first line contains two integers N and M.
The second line contains N integers A_i – performances of chips.
1 ≤ N, M ≤ 10^5, -10^6 < A_i < 10^6
Output
The highest effectiveness of neural network built on the board with chips.