import heapq
N,M = map(int,input().split())
A = list(map(lambda x: int(x)*(-1), input().split()))
heapq.heapify(A)

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

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

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

print(int(sum(A)*-1))