{"raw_statement":[{"iden":"problem statement","content":"Snuke has $N$ sticks. The length of the $i$\\-th stick is $l_i$.\nSnuke is making a snake toy by joining $K$ of the sticks together.\nThe length of the toy is represented by the sum of the individual sticks that compose it. Find the maximum possible length of the toy."},{"iden":"constraints","content":"*   $1 \\leq K \\leq N \\leq 50$\n*   $1 \\leq l_i \\leq 50$\n*   $l_i$ is an integer."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $K$\n$l_1$ $l_2$ $l_3$ $...$ $l_{N}$"},{"iden":"sample input 1","content":"5 3\n1 2 3 4 5"},{"iden":"sample output 1","content":"12\n\nYou can make a toy of length $12$ by joining the sticks of lengths $3$, $4$ and $5$, which is the maximum possible length."},{"iden":"sample input 2","content":"15 14\n50 26 27 21 41 7 42 35 7 5 5 36 39 1 45"},{"iden":"sample output 2","content":"386"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}