The Lalalandia's Christmas is coming! Only N days are left and Jambo wants to buy all his friends a present. There are N presents that his friends want and Jambo, because he is a very small elephant, cannot buy and carry more than K presents at any day. Every present in jth day costs ai∗j for every 1≤j≤N. Can you help Jambo determine the minimum amount of money needed to buy all presents and make his friends happy?
Input format
The first line consists of integers N - the number of days and the number of presents Jambo wants to buy, and K - the number of presents Jambo can carry. The second line contains n integers — the cost of the ith present.
Output format
The first line should contain the single integer - answer to the problem.
Constraints:
Since K equals to 1, the optimal solution is .