Problem1655--CF802 - M. April Fools' Problem (easy)

1655: CF802 - M. April Fools' Problem (easy)

[Creator : ]
Time Limit : 2.000 sec  Memory Limit : 256 MiB

Description

The marmots have prepared a very easy problem for this year's HC$^2$ — this one. It involves numbersn,kand a sequence of $n$ positive integers $a_1,a_2,...,a_n$. They also came up with a beautiful and riveting story for the problem statement. It explains what the input means, what the program should output, and it also reads like a good criminal.
However I, Heidi, will have none of that. As my joke for today, I am removing the story from the statement and replacing it with these two unhelpful paragraphs. Now solve the problem, fools!

Input

The first line of the input contains two space-separated integers $n,k\ (1≤k≤n≤2200)$. 
The second line contains $n$ space-separated integers $a_1,...,a_n\ (1≤a_i≤10^4)$.

Output

Output one number.

Sample 1 Input

8 5
1 1 1 1 1 1 1 1

Sample 1 Output

5

Sample 2 Input

10 3
16 8 2 4 512 256 32 128 64 1

Sample 2 Output

7

Sample 3 Input

5 1
20 10 50 30 46

Sample 3 Output

10

6 6
6 6 6 6 6 6

36

Sample 4 Input

1 1
100

Sample 4 Output

100

HINT

Source/Category