import heapq
N,M = map(int,input().split())
pq = [-i for i in list(map(int,input().split()))]
heapq.heapify(pq)

for _ in range(M):
  i = heapq.heappop(pq)
  i *= -1
  i //= 2
  heapq.heappush(pq, -i)

print(-sum(pq)) import heapq heapq N,M = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split M -i for i in list(map(int,input().split())) for i in list(map(int,input().split())) i list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split for i in list(map(int,input().split())) -i i pq = [-i for i in list(map(int,input().split()))] pq [-i for i in list(map(int,input().split()))] heapq.heapify(pq) heapq.heapify heapq heapify pq for _ in range(M):
  i = heapq.heappop(pq)
  i *= -1
  i //= 2
  heapq.heappush(pq, -i) _ range(M) range M i = heapq.heappop(pq) i heapq.heappop(pq) heapq.heappop heapq heappop pq i *= -1 i -1 i //= 2 i 2 heapq.heappush(pq, -i) heapq.heappush heapq heappush pq -i i print(-sum(pq)) print -sum(pq) sum(pq) sum pq M = map(int,input().split()) map(int,input().split()) M i //= 2 2 i N,M = map(int,input().split()) map(int,input().split()) N i *= -1 -1 i i = heapq.heappop(pq) heapq.heappop(pq) i pq = [-i for i in list(map(int,input().split()))] [-i for i in list(map(int,input().split()))] pq
import heapq
N,M = map(int,input().split())
pq = [-i for i in list(map(int,input().split()))]
heapq.heapify(pq)

for _ in range(M):
  i = heapq.heappop(pq)
  i *= -1
  i //= 2
  heapq.heappush(pq, -i)

print(-sum(pq))