import heapq
n,m = map(int, input().split())
al = list(map(int, input().split()))
al = [(-1)*a for a in al]
al.sort()

for _ in range(m):
    poped = heapq.heappop(al)
    heapq.heappush(al, (poped*(-1)//2)*(-1))

print(sum(al)*(-1)) import heapq heapq 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 (-1)*a for a in al for a in al a al for a in al (-1)*a -1 a al = [(-1)*a for a in al] al [(-1)*a for a in al] al.sort() al.sort al sort for _ in range(m):
    poped = heapq.heappop(al)
    heapq.heappush(al, (poped*(-1)//2)*(-1)) _ range(m) range m poped = heapq.heappop(al) poped heapq.heappop(al) heapq.heappop heapq heappop al heapq.heappush(al, (poped*(-1)//2)*(-1)) heapq.heappush heapq heappush al (poped*(-1)//2)*(-1) poped*(-1)//2 poped*(-1) poped -1 2 -1 print(sum(al)*(-1)) print sum(al)*(-1) sum(al) sum al -1 al = [(-1)*a for a in al] [(-1)*a for a in al] al n,m = map(int, input().split()) map(int, input().split()) n al = list(map(int, input().split())) list(map(int, input().split())) al poped = heapq.heappop(al) heapq.heappop(al) poped m = map(int, input().split()) map(int, input().split()) m
import heapq
n,m = map(int, input().split())
al = list(map(int, input().split()))
al = [(-1)*a for a in al]
al.sort()

for _ in range(m):
    poped = heapq.heappop(al)
    heapq.heappush(al, (poped*(-1)//2)*(-1))

print(sum(al)*(-1))