[N,M] = list(map(int,input().split()))
A = list(map(int,input().split()))
out=sum(A)
import heapq
a = list(map(lambda x: x*(-1), A))  # 各要素を-1倍 最大値取り出すため
heapq.heapify(a)
# print(a)

for i in range(M):
    # saidai = max(A)
    saidai = heapq.heappop(a)*(-1)
    out-=saidai
    out+=saidai//2
    # A[A.index(saidai)] = saidai//2
    heapq.heappush(a, (saidai//2)*(-1))
    # print('dam,out,a:',saidai,out,a)

print(out) [N,M] = list(map(int,input().split())) [N,M] N M list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split A = list(map(int,input().split())) A list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split out=sum(A) out sum(A) sum A import heapq heapq a = list(map(lambda x: x*(-1), A)) a list(map(lambda x: x*(-1), A)) list map(lambda x: x*(-1), A) map lambda x: x*(-1) x*(-1) x -1 x A heapq.heapify(a) heapq.heapify heapq heapify a for i in range(M):
    # saidai = max(A)
    saidai = heapq.heappop(a)*(-1)
    out-=saidai
    out+=saidai//2
    # A[A.index(saidai)] = saidai//2
    heapq.heappush(a, (saidai//2)*(-1))
    # print('dam,out,a:',saidai,out,a) i range(M) range M saidai = heapq.heappop(a)*(-1) saidai heapq.heappop(a)*(-1) heapq.heappop(a) heapq.heappop heapq heappop a -1 out-=saidai out saidai out+=saidai//2 out saidai//2 saidai 2 heapq.heappush(a, (saidai//2)*(-1)) heapq.heappush heapq heappush a (saidai//2)*(-1) saidai//2 saidai 2 -1 print(out) print out out-=saidai saidai out out+=saidai//2 saidai//2 out A = list(map(int,input().split())) list(map(int,input().split())) A out=sum(A) sum(A) out a = list(map(lambda x: x*(-1), A)) list(map(lambda x: x*(-1), A)) a saidai = heapq.heappop(a)*(-1) heapq.heappop(a)*(-1) saidai
[N,M] = list(map(int,input().split()))
A = list(map(int,input().split()))
out=sum(A)
import heapq
a = list(map(lambda x: x*(-1), A))  # 各要素を-1倍 最大値取り出すため
heapq.heapify(a)
# print(a)

for i in range(M):
    # saidai = max(A)
    saidai = heapq.heappop(a)*(-1)
    out-=saidai
    out+=saidai//2
    # A[A.index(saidai)] = saidai//2
    heapq.heappush(a, (saidai//2)*(-1))
    # print('dam,out,a:',saidai,out,a)

print(out)
