import heapq


N, M = [int(x) for x in input().split()]
A = [-int(x) for x in input().split()]

heapq.heapify(A)
for i in range(M):
    a = -heapq.heappop(A)
    a //= 2
    heapq.heappush(A, -a)

print(-sum(A)) import heapq heapq int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x N, M = [int(x) for x in input().split()] N [int(x) for x in input().split()] M -int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() -int(x) int(x) int x A = [-int(x) for x in input().split()] A [-int(x) for x in input().split()] heapq.heapify(A) heapq.heapify heapq heapify A for i in range(M):
    a = -heapq.heappop(A)
    a //= 2
    heapq.heappush(A, -a) i range(M) range M a = -heapq.heappop(A) a -heapq.heappop(A) heapq.heappop(A) heapq.heappop heapq heappop A a //= 2 a 2 heapq.heappush(A, -a) heapq.heappush heapq heappush A -a a print(-sum(A)) print -sum(A) sum(A) sum A N, M = [int(x) for x in input().split()] [int(x) for x in input().split()] N M = [int(x) for x in input().split()] [int(x) for x in input().split()] M a = -heapq.heappop(A) -heapq.heappop(A) a A = [-int(x) for x in input().split()] [-int(x) for x in input().split()] A a //= 2 2 a
import heapq


N, M = [int(x) for x in input().split()]
A = [-int(x) for x in input().split()]

heapq.heapify(A)
for i in range(M):
    a = -heapq.heappop(A)
    a //= 2
    heapq.heappush(A, -a)

print(-sum(A))
