G. The Witchwood
time limit per test
2 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output

Shenyang's night fair culture is developed very well. Every time Bob comes to Shenyang, he will definitely go to a night fair called The Witchwood. There are $$$n$$$ snack stalls in The Witchwood, the $$$i$$$th of which gives him $$$a_i$$$ pleasure.

Bob's stomach allows him to eat $$$k$$$ snack stalls at most. So Bob wants to know the maximum pleasure he can get after visiting the night market.

Input

The first line of input contains two integers $$$n$$$ $$$(1 \le n \le 1000)$$$ and $$$k$$$ $$$(1\le k \le n)$$$, indicating the number of snack stalls and the capacity of Bob's stomach.

The second line of input contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ $$$(1\leq a_i \leq 10^9)$$$, the $$$i$$$th of which indicates the pleasure of the $$$i$$$th snack stall.

Output

Print one integer denoting the maximum pleasure Bob can get.

Example
Input
5 2
9 8 10 2 4
Output
19