#!/usr/bin/env python3

from heapq import heapify, heappop, heappush

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

heapify(a)

for i in range(m):
    min = heappop(a)
    heappush(a, (-1)*(-1*min//2)) # 要素の挿入

ans = -sum(a)

print(ans) from heapq import heapify, heappop, heappush n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m a = list(map(lambda x: int(x)*-1, input().split())) a 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 heapify(a) heapify a for i in range(m):
    min = heappop(a)
    heappush(a, (-1)*(-1*min//2)) # 要素の挿入 i range(m) range m min = heappop(a) min heappop(a) heappop a heappush(a, (-1)*(-1*min//2)) heappush a (-1)*(-1*min//2) -1 -1*min//2 -1*min -1 min 2 ans = -sum(a) ans -sum(a) sum(a) sum a print(ans) print ans n, m = map(int, input().split()) map(int, input().split()) n min = heappop(a) heappop(a) min ans = -sum(a) -sum(a) ans a = list(map(lambda x: int(x)*-1, input().split())) list(map(lambda x: int(x)*-1, input().split())) a m = map(int, input().split()) map(int, input().split()) m
#!/usr/bin/env python3

from heapq import heapify, heappop, heappush

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

heapify(a)

for i in range(m):
    min = heappop(a)
    heappush(a, (-1)*(-1*min//2)) # 要素の挿入

ans = -sum(a)

print(ans)
