Sweet part-time job

Junsu can work at most m consecutive days out of n days with given daily wages; find the maximum total pay for such a window.

Easy3Sliding windowPrefix sumArrayNo attempts yetTime limit1sMemory limit512 MB

Problem

Yunho owns a convenience store with an unusual pay scheme.

  • The amount of work differs from day to day, so the pay for each day is fixed in advance.
  • Yunho pays the exact daily wage on the same day it is earned.
  • He lets an employee work only the number of days agreed on.
  • He never hires anyone back after they quit. So once hired, you must work every day from your first day to your last, with no day off in between.

Junsu has to pay rent in n+1n+1 days, so he wants a job at Yunho's store. From the pay records left by people who quit earlier, he learned the daily wage for every day from day 1 to day nn. He also has an exam to prepare for, so he can work at most mm days.

Junsu can work only on consecutive days. Find the largest amount he can earn.

Input

The first line contains the number of days left before rent is due, nn (1n100,0001 \le n \le 100{,}000), and the largest number of days Junsu can work, mm (0mn0 \le m \le n), separated by a space.

The second line contains the daily wages TiT_i for day 1 through day nn in order (0<Ti1,000,0000 < T_i \le 1{,}000{,}000).

Output

Print the largest amount Junsu can earn on one line.