import heapq

n, m = map(int, input().split())
an = list(map(int, input().split()))

an = [-1 * i for i in an]

heapq.heapify(an)

for _ in range(m):
    x = heapq.heappop(an)
    x = int(x/2)
    heapq.heappush(an, x)

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

n, m = map(int, input().split())
an = list(map(int, input().split()))

an = [-1 * i for i in an]

heapq.heapify(an)

for _ in range(m):
    x = heapq.heappop(an)
    x = int(x/2)
    heapq.heappush(an, x)

print(-1 * sum(an))