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