Problem P. 43. Minimal price
Input file name: standard input
Output file name: standard output
Time limit: 1 s
Memory limit: 1024 MB
You are given N items with prices P_1, P_2, \dots, P_N. You have exactly K coupons. Each coupon allows you to round the price of one item to the nearest multiple of 10.
The rounding follows standard rules:
  • If the last digit of the price is 0, 1, 2, 3, or 4, the price is rounded down (e.g., 14 \to 10, 20 \to 20, 3 \to 0).
  • If the last digit of the price is 5, 6, 7, 8, or 9, the price is rounded up (e.g., 15 \to 20, 19 \to 20, 7 \to 10).
You must use all K coupons. Each item can have at most one coupon applied to it. Your task is to determine the minimum possible total sum of all N prices after applying exactly K coupons.

Input

The first line contains two integers N and K (1 \le K \le N \le 10^5). The second line contains N integers P_1, P_2, \dots, P_N (1 \le P_i \le 10^9), representing the initial prices of the items.

Output

Print a single integer representing the minimum possible total sum of the prices after using exactly K coupons.

Examples

standard inputstandard output
3 1 14 15 19 44
4 2 11 12 13 14 43