import heapq
N, M = map(int, input().split())
hq = []
for price in map(int, input().split()):
    heapq.heappush(hq, -price)

for i in range(M):
    p = -heapq.heappop(hq)
    p /= 2
    heapq.heappush(hq, -p)

result = -sum([int(p) for p in hq])
print(result) import heapq heapq N, M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M hq = [] hq [] for price in map(int, input().split()):
    heapq.heappush(hq, -price) price map(int, input().split()) map int input().split() ().split () input split heapq.heappush(hq, -price) heapq.heappush heapq heappush hq -price price for i in range(M):
    p = -heapq.heappop(hq)
    p /= 2
    heapq.heappush(hq, -p) i range(M) range M p = -heapq.heappop(hq) p -heapq.heappop(hq) heapq.heappop(hq) heapq.heappop heapq heappop hq p /= 2 p 2 heapq.heappush(hq, -p) heapq.heappush heapq heappush hq -p p int(p) for p in hq for p in hq p hq for p in hq int(p) int p result = -sum([int(p) for p in hq]) result -sum([int(p) for p in hq]) sum([int(p) for p in hq]) sum [int(p) for p in hq] print(result) print result hq = [] [] hq p = -heapq.heappop(hq) -heapq.heappop(hq) p p /= 2 2 p result = -sum([int(p) for p in hq]) -sum([int(p) for p in hq]) result N, M = map(int, input().split()) map(int, input().split()) N M = map(int, input().split()) map(int, input().split()) M
import heapq
N, M = map(int, input().split())
hq = []
for price in map(int, input().split()):
    heapq.heappush(hq, -price)

for i in range(M):
    p = -heapq.heappop(hq)
    p /= 2
    heapq.heappush(hq, -p)

result = -sum([int(p) for p in hq])
print(result)
