from heapq import heappush, heappop, heapify
N, M = map(int, input().split())
aaa = list(map(lambda x: -x , map(int, input().split())))
heapify(aaa)
for _ in range(M):
    a = heappop(aaa)
    if a < 0:
        a *= -1
        a //= 2
        a *= -1
    heappush(aaa, a)
print(-sum(aaa)) from heapq import heappush, heappop, heapify N, M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M aaa = list(map(lambda x: -x , map(int, input().split()))) aaa list(map(lambda x: -x , map(int, input().split()))) list map(lambda x: -x , map(int, input().split())) map lambda x: -x -x x x map(int, input().split()) map int input().split() ().split () input split heapify(aaa) heapify aaa for _ in range(M):
    a = heappop(aaa)
    if a < 0:
        a *= -1
        a //= 2
        a *= -1
    heappush(aaa, a) _ range(M) range M a = heappop(aaa) a heappop(aaa) heappop aaa if a < 0:
        a *= -1
        a //= 2
        a *= -1
     a < 0 a 0 a *= -1 a -1 a //= 2 a 2 a *= -1 a -1 heappush(aaa, a) heappush aaa a print(-sum(aaa)) print -sum(aaa) sum(aaa) sum aaa a //= 2 2 a aaa = list(map(lambda x: -x , map(int, input().split()))) list(map(lambda x: -x , map(int, input().split()))) aaa N, M = map(int, input().split()) map(int, input().split()) N M = map(int, input().split()) map(int, input().split()) M a *= -1 -1 a a = heappop(aaa) heappop(aaa) a a *= -1 -1 a
from heapq import heappush, heappop, heapify
N, M = map(int, input().split())
aaa = list(map(lambda x: -x , map(int, input().split())))
heapify(aaa)
for _ in range(M):
    a = heappop(aaa)
    if a < 0:
        a *= -1
        a //= 2
        a *= -1
    heappush(aaa, a)
print(-sum(aaa))
