# Minimize Array Sum by at most K Reductions
## Problem Statement
Given an array of $n$ integers $a_1, a_2, \dots, a_n$, the task is to minimize the sum of the array by performing at most $k$ operations. Each operation consists of choosing an element $a_i$ from the array and replacing it with $\lfloor a_i / 2 \rfloor$. You can perform this operation on any element multiple times.
To achieve the minimum possible sum, you should always choose to reduce the largest element currently in the array. If all elements are $0$, no further reduction is possible.
## Input Format
- The first line contains two integers $n$ and $k$ ($1 \le n \le 10^5$, $0 \le k \le 10^5$).
- The second line contains $n$ integers $a_1, a_2, \dots, a_n$ ($0 \le a_i \le 10^9$).
## Output Format
Output a single integer, the minimum possible sum of the array after performing at most $k$ operations.
## Sample Test Cases
### Sample Input 1
```
4 3
20 7 5 4
```
### Sample Output 1
```
17
```
### Sample Input 2
```
4 2
10 4 6 16
```
### Sample Output 2
```
23
```
## Constraints
- $1 \le n \le 10^5$
- $0 \le k \le 10^5$
- $0 \le a_i \le 10^9$
- Time limit: 1 second
- Memory limit: 256 MB
## Explanation
For Sample 1:
Initial array: $[20, 7, 5, 4]$, sum $= 36$. $k=3$.
1. **Operation 1:** The largest element is $20$. Replace $20$ with $\lfloor 20/2 \rfloor = 10$. Array becomes $[10, 7, 5, 4]$. Sum $= 26$. $k=2$.
2. **Operation 2:** The largest element is $10$. Replace $10$ with $\lfloor 10/2 \rfloor = 5$. Array becomes $[5, 7, 5, 4]$. Sum $= 21$. $k=1$.
3. **Operation 3:** The largest element is $7$. Replace $7$ with $\lfloor 7/2 \rfloor = 3$. Array becomes $[5, 3, 5, 4]$. Sum $= 17$. $k=0$.
No more operations can be performed. The minimum sum is $17$.
Loading problem statement...