from heapq import *
N,M = map(int,input().split())
A = list(map(lambda x: -int(x),input().split()))
heapify(A)
for i in range(M):
    heappush(A,-(-heappop(A)//2))
print(-sum(A)) from heapq import * N,M = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split M A = list(map(lambda x: -int(x),input().split())) A list(map(lambda x: -int(x),input().split())) list map(lambda x: -int(x),input().split()) map lambda x: -int(x) -int(x) int(x) int x x input().split() ().split () input split heapify(A) heapify A for i in range(M):
    heappush(A,-(-heappop(A)//2)) i range(M) range M heappush(A,-(-heappop(A)//2)) heappush A -(-heappop(A)//2) -heappop(A)//2 -heappop(A) heappop(A) heappop A 2 print(-sum(A)) print -sum(A) sum(A) sum A A = list(map(lambda x: -int(x),input().split())) list(map(lambda x: -int(x),input().split())) A N,M = map(int,input().split()) map(int,input().split()) N M = map(int,input().split()) map(int,input().split()) M
from heapq import *
N,M = map(int,input().split())
A = list(map(lambda x: -int(x),input().split()))
heapify(A)
for i in range(M):
    heappush(A,-(-heappop(A)//2))
print(-sum(A))