from heapq import*

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

N, M = map(int, input().split())
a = list(map(lambda x: -int(x), input().split()))
heapify(a)
for _ in range(M):
    n = - heappop(a)
    n //= 2
    heappush(a, -n)
print(-sum(a))