import heapq
N,M = map(int,input().split())
A = list(map(int,input().split()))
q = []
for i in A:
    heapq.heappush(q, -i)

for i in range(M):
    expe = heapq.heappop(q)
    expe = -expe // 2
    heapq.heappush(q, -expe)
print(-sum(q)) import heapq heapq N,M = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split M A = list(map(int,input().split())) A list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split q = [] q [] for i in A:
    heapq.heappush(q, -i) i A heapq.heappush(q, -i) heapq.heappush heapq heappush q -i i for i in range(M):
    expe = heapq.heappop(q)
    expe = -expe // 2
    heapq.heappush(q, -expe) i range(M) range M expe = heapq.heappop(q) expe heapq.heappop(q) heapq.heappop heapq heappop q expe = -expe // 2 expe -expe // 2 -expe expe 2 heapq.heappush(q, -expe) heapq.heappush heapq heappush q -expe expe print(-sum(q)) print -sum(q) sum(q) sum q M = map(int,input().split()) map(int,input().split()) M A = list(map(int,input().split())) list(map(int,input().split())) A expe = -expe // 2 -expe // 2 expe expe = heapq.heappop(q) heapq.heappop(q) expe N,M = map(int,input().split()) map(int,input().split()) N q = [] [] q
import heapq
N,M = map(int,input().split())
A = list(map(int,input().split()))
q = []
for i in A:
    heapq.heappush(q, -i)

for i in range(M):
    expe = heapq.heappop(q)
    expe = -expe // 2
    heapq.heappush(q, -expe)
print(-sum(q))