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

A = list(map(lambda x: x*(-1), A))
heapq.heapify(A)

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

A = list(A)
print(sum(A)* (-1)) import heapq heapq import math math N, M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M A = list(map(int,input().split())) A list(map(int,input().split())) list 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 for i in range(M):
    a = heapq.heappop(A)
    a = math.ceil(a / 2)
    heapq.heappush(A, a) i range(M) range M a = heapq.heappop(A) a heapq.heappop(A) heapq.heappop heapq heappop A a = math.ceil(a / 2) a math.ceil(a / 2) math.ceil math ceil a / 2 a 2 heapq.heappush(A, a) heapq.heappush heapq heappush A a A = list(A) A list(A) list A print(sum(A)* (-1)) print sum(A)* (-1) sum(A) sum A -1 M = map(int, input().split()) map(int, input().split()) M a = heapq.heappop(A) heapq.heappop(A) a A = list(A) list(A) 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 A = list(map(int,input().split())) list(map(int,input().split())) A a = math.ceil(a / 2) math.ceil(a / 2) a
import heapq
import math
N, M = map(int, input().split())
A = list(map(int,input().split()))

A = list(map(lambda x: x*(-1), A))
heapq.heapify(A)

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

A = list(A)
print(sum(A)* (-1))