#### Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

## Problem Description

Jiahai is making a potato salad today! In fact, just for this purpose, he is harvesting potatoes from his very own potato farm today. Being incredibly adept at picking potatoes, he has managed to pick up *N* potatoes from the potato farm.

However, his culinary competition is coming up in *D* days! This culinary competition involves making as much mashed potato as possible. However, he can only process one potato a day. He has a set of *N* potatoes from the potato farm, each with a different mass. A potato with mass *M* kg can be made into *M* kg of mashed potato.

Given the set of potatoes that he has collected and their respective masses, calculate the maximum amount of mashed potato (in kg) he can make at the end of *D* days.

PS: This is based on a true story. In fact, here is a poster of JPF in real life:

## Input

The first line of input will contain two integers, *N* and *D*.

The second line of input will contain *N* integers, with the *i*th integer representing the mass of the *i*th potato.

## Output

Your output should contain one integer, the maximum amount of mashed potato he can make.

## Limits

1 <= N <= 100 000

1 <= M_{i} <= 1 000

## Sample Input 1

4 2 9 1 4 12

## Sample Output 1

21

### Tags

### Subtasks and Limits

Subtask | Score | #TC | Time | Memory | Scoring |
---|---|---|---|---|---|

1 | 100 | 10 | 1s | 64MB | Minimum |

2 | 0 | 1 | 1s | 64MB | Minimum |

### Judge Compile Command

g++ ans.cpp -o potatosalad -Wall -static -O2 -lm -m64 -s -w -std=gnu++14 -fmax-errors=512