AT_awc0001_c 割引クーポン
Description
Takahashi is about to go shopping on an online shopping site.
The shopping site has $ N $ items, and each item $ i $ has a price of $ D_i $ yen. Takahashi plans to purchase all the items.
Takahashi has a special discount coupon. By using this coupon, he can reduce the price of selected items to $ 0 $ yen. However, there is a restriction that the coupon can be applied to at most $ K $ items.
Takahashi wants to use the coupon optimally to minimize the total amount he pays. Find the minimum total amount he needs to pay when using the coupon optimally.
Input Format
> $ N $ $ K $ $ D_1 $ $ D_2 $ $ \ldots $ $ D_N $
- The first line contains $ N $ , representing the number of items, and $ K $ , representing the maximum number of items the coupon can be applied to, separated by a space.
- The second line contains $ D_1, D_2, \ldots, D_N $ , representing the price of each item, separated by spaces.
Output Format
Output the minimum total amount to pay in one line.
Explanation/Hint
### Constraints
- $ 1 \leq N \leq 2 \times 10^5 $
- $ 0 \leq K \leq N $
- $ 1 \leq D_i \leq 10^9 $
- All inputs are integers