from heapq import heappop, heappush, heapify
n,m = map(int, input().split())
al = list(map(int, input().split()))
alm = []
for a in al:
    alm.append(a*(-1))

heapify(alm)
for _ in range(m):
    poped = heappop(alm)
    val = (poped*(-1))//2
    heappush(alm, val*(-1))

ans = sum(alm)
print(-ans) from heapq import heappop, heappush, heapify n,m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m al = list(map(int, input().split())) al list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split alm = [] alm [] for a in al:
    alm.append(a*(-1)) a al alm.append(a*(-1)) alm.append alm append a*(-1) a -1 heapify(alm) heapify alm for _ in range(m):
    poped = heappop(alm)
    val = (poped*(-1))//2
    heappush(alm, val*(-1)) _ range(m) range m poped = heappop(alm) poped heappop(alm) heappop alm val = (poped*(-1))//2 val (poped*(-1))//2 poped*(-1) poped -1 2 heappush(alm, val*(-1)) heappush alm val*(-1) val -1 ans = sum(alm) ans sum(alm) sum alm print(-ans) print -ans ans poped = heappop(alm) heappop(alm) poped al = list(map(int, input().split())) list(map(int, input().split())) al ans = sum(alm) sum(alm) ans alm = [] [] alm m = map(int, input().split()) map(int, input().split()) m val = (poped*(-1))//2 (poped*(-1))//2 val n,m = map(int, input().split()) map(int, input().split()) n
from heapq import heappop, heappush, heapify
n,m = map(int, input().split())
al = list(map(int, input().split()))
alm = []
for a in al:
    alm.append(a*(-1))

heapify(alm)
for _ in range(m):
    poped = heappop(alm)
    val = (poped*(-1))//2
    heappush(alm, val*(-1))

ans = sum(alm)
print(-ans)
