
from heapq import heappop, heappush

N, M = map(int, input().split())
X = list(map(int, input().split()))

pq = []
for v in X:
    heappush(pq, -v)

for _ in range(M):
    u = heappop(pq)
    heappush(pq, -(-u // 2))

print(-sum(pq)) from heapq import heappop, heappush N, M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M X = list(map(int, input().split())) X list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split pq = [] pq [] for v in X:
    heappush(pq, -v) v X heappush(pq, -v) heappush pq -v v for _ in range(M):
    u = heappop(pq)
    heappush(pq, -(-u // 2)) _ range(M) range M u = heappop(pq) u heappop(pq) heappop pq heappush(pq, -(-u // 2)) heappush pq -(-u // 2) -u // 2 -u u 2 print(-sum(pq)) print -sum(pq) sum(pq) sum pq N, M = map(int, input().split()) map(int, input().split()) N u = heappop(pq) heappop(pq) u X = list(map(int, input().split())) list(map(int, input().split())) X pq = [] [] pq M = map(int, input().split()) map(int, input().split()) M

from heapq import heappop, heappush

N, M = map(int, input().split())
X = list(map(int, input().split()))

pq = []
for v in X:
    heappush(pq, -v)

for _ in range(M):
    u = heappop(pq)
    heappush(pq, -(-u // 2))

print(-sum(pq))
