import heapq

n, m = map(int, input().split())
aL = list(map(lambda x: int(x) * (-1), input().split(" ")))

heapq.heapify(aL)

for i in range(m):
    a = heapq.heappop(aL)
    a = int(a / 2)
    heapq.heappush(aL, a)

print(int(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(lambda x: int(x) * (-1), input().split(" "))) aL list(map(lambda x: int(x) * (-1), input().split(" "))) list map(lambda x: int(x) * (-1), input().split(" ")) map lambda x: int(x) * (-1) int(x) * (-1) int(x) int x -1 x input().split(" ") ().split () input split " " heapq.heapify(aL) heapq.heapify heapq heapify aL for i in range(m):
    a = heapq.heappop(aL)
    a = int(a / 2)
    heapq.heappush(aL, a) i range(m) range m a = heapq.heappop(aL) a heapq.heappop(aL) heapq.heappop heapq heappop aL a = int(a / 2) a int(a / 2) int a / 2 a 2 heapq.heappush(aL, a) heapq.heappush heapq heappush aL a print(int(sum(aL) * -1)) print int(sum(aL) * -1) int sum(aL) * -1 sum(aL) sum aL -1 a = int(a / 2) int(a / 2) a n, m = map(int, input().split()) map(int, input().split()) n aL = list(map(lambda x: int(x) * (-1), input().split(" "))) list(map(lambda x: int(x) * (-1), input().split(" "))) aL a = heapq.heappop(aL) heapq.heappop(aL) a m = map(int, input().split()) map(int, input().split()) m
import heapq

n, m = map(int, input().split())
aL = list(map(lambda x: int(x) * (-1), input().split(" ")))

heapq.heapify(aL)

for i in range(m):
    a = heapq.heappop(aL)
    a = int(a / 2)
    heapq.heappush(aL, a)

print(int(sum(aL) * -1))
