Jamboree
문제
A group of scouts are preparing to go to a large meeting with other scouts. Their leader Hildeborg, in spirit of the scout motto "be prepared", wants to distribute some useful items among the scouts that they most probably will need on their adventure. The items come in different sizes, so to make this as fair as possible, she wants to make sure that the total size of items carried by any scout is as small as possible. Furthermore, Hildeborg does not want to give more than two items to any scout as she is afraid that it otherwise will be too hard for them to remember to bring everything. Given the sizes of the items, what is the least maximum total size, computed as the sum of items, any scout will have to carry?
입력
The first line of input contains two positive integers and (, ). is the number of useful items, and is the number of scouts. The second line contains positive integers () giving the sizes of the items.
출력
Print one integer, the smallest total size that any scout has to carry.
예제
예제 1
3 4 10 10 10
10
예제 2
5 4 9 12 3 9 10
12