
import heapq

N,M = map(int,input().split())
A = [-int(_) for _ in input().split()]


#print(A)
heapq.heapify(A)

for i in range(M):
    heapq.heappush(A,-(-heapq.heappop(A)//2))
    
print(-sum(A)) import heapq heapq N,M = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split M -int(_) for _ in input().split() for _ in input().split() _ input().split() ().split () input split for _ in input().split() -int(_) int(_) int _ A = [-int(_) for _ in input().split()] A [-int(_) for _ in input().split()] heapq.heapify(A) heapq.heapify heapq heapify A for i in range(M):
    heapq.heappush(A,-(-heapq.heappop(A)//2))
     i range(M) range M heapq.heappush(A,-(-heapq.heappop(A)//2)) heapq.heappush heapq heappush A -(-heapq.heappop(A)//2) -heapq.heappop(A)//2 -heapq.heappop(A) heapq.heappop(A) heapq.heappop heapq heappop A 2 print(-sum(A)) print -sum(A) sum(A) sum A A = [-int(_) for _ in input().split()] [-int(_) for _ in input().split()] A 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())
A = [-int(_) for _ in input().split()]


#print(A)
heapq.heapify(A)

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