import heapq
N, M = map(int, input().split())
*A, = map(int, input().split())

A = list(map(lambda x: x*(-1), A))  # 各要素を-1倍
heapq.heapify(A)

while M>0:
    a = heapq.heappop(A)*(-1)
    heapq.heappush(A, -int(a/2))
    M -= 1

print(-sum(A)) import heapq heapq N, M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M *A, = map(int, input().split()) *A A map(int, input().split()) map int input().split() ().split () input split A = list(map(lambda x: x*(-1), A)) A list(map(lambda x: x*(-1), A)) list map(lambda x: x*(-1), A) map lambda x: x*(-1) x*(-1) x -1 x A heapq.heapify(A) heapq.heapify heapq heapify A while M>0:
    a = heapq.heappop(A)*(-1)
    heapq.heappush(A, -int(a/2))
    M -= 1 M>0 M 0 a = heapq.heappop(A)*(-1) a heapq.heappop(A)*(-1) heapq.heappop(A) heapq.heappop heapq heappop A -1 heapq.heappush(A, -int(a/2)) heapq.heappush heapq heappush A -int(a/2) int(a/2) int a/2 a 2 M -= 1 M 1 print(-sum(A)) print -sum(A) sum(A) sum A N, M = map(int, input().split()) map(int, input().split()) N A = list(map(lambda x: x*(-1), A)) list(map(lambda x: x*(-1), A)) A M -= 1 1 M M = map(int, input().split()) map(int, input().split()) M a = heapq.heappop(A)*(-1) heapq.heappop(A)*(-1) a
import heapq
N, M = map(int, input().split())
*A, = map(int, input().split())

A = list(map(lambda x: x*(-1), A))  # 各要素を-1倍
heapq.heapify(A)

while M>0:
    a = heapq.heappop(A)*(-1)
    heapq.heappush(A, -int(a/2))
    M -= 1

print(-sum(A))