Question
World Cup Penalty Lineup

A football coach is preparing a penalty shootout lineup for a FIFA World Cup knockout match.

There are n players standing in a fixed order from 1 to n.

The confidence value of player i is a_i.

The coach wants to choose exactly k players for the shootout.

However, to avoid pressure between nearby players, no two chosen players can be adjacent in the given order.

Your task is to find the maximum total confidence of exactly k chosen players. If it is impossible to choose such players, print -1.

Input

The first line contains two integers KaTeX can only parse string typed expression and KaTeX can only parse string typed expression — the number of players and the number of players to choose.

The second line contains KaTeX can only parse string typed expression integers KaTeX can only parse string typed expression — the confidence values of the players.

Output

Print a single integer — the maximum total confidence of exactly KaTeX can only parse string typed expression chosen players such that no two chosen players are adjacent.

If it is impossible, print KaTeX can only parse string typed expression.

Example
Example 1:
Input
5 2

10 50 20 60 30
Output
110
Explanation
Choose player KaTeX can only parse string typed expression and player KaTeX can only parse string typed expression.
They are not adjacent, and the total confidence is KaTeX can only parse string typed expression.

Example 2:
Input
3 3

5 10 20
Output
-1
Explanation
It is impossible to choose all KaTeX can only parse string typed expression players because adjacent players cannot both be chosen.

Online