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