CF779C Dishonest Sellers

Description

Igor found out discounts in a shop and decided to buy $ n $ items. Discounts at the store will last for a week and Igor knows about each item that its price now is $ a_{i} $ , and after a week of discounts its price will be $ b_{i} $ . Not all of sellers are honest, so now some products could be more expensive than after a week of discounts. Igor decided that buy at least $ k $ of items now, but wait with the rest of the week in order to save money as much as possible. Your task is to determine the minimum money that Igor can spend to buy all $ n $ items.

Input Format

In the first line there are two positive integer numbers $ n $ and $ k $ ( $ 1

Output Format

Print the minimal amount of money Igor will spend to buy all $ n $ items. Remember, he should buy at least $ k $ items right now.

Explanation/Hint

In the first example Igor should buy item 3 paying 6. But items 1 and 2 he should buy after a week. He will pay 3 and 1 for them. So in total he will pay $ 6+3+1=10 $ . In the second example Igor should buy right now items 1, 2, 4 and 5, paying for them 3, 4, 10 and 3, respectively. Item 3 he should buy after a week of discounts, he will pay 5 for it. In total he will spend $ 3+4+10+3+5=25 $ .