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):
    tmp_min=heapq.heappop(a)
    if tmp_min%2==0:
        push=tmp_min/2
    else:
        push=tmp_min//2+1
    heapq.heappush(a,push)
print(int(-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=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):
    tmp_min=heapq.heappop(a)
    if tmp_min%2==0:
        push=tmp_min/2
    else:
        push=tmp_min//2+1
    heapq.heappush(a,push) i range(m) range m tmp_min=heapq.heappop(a) tmp_min heapq.heappop(a) heapq.heappop heapq heappop a if tmp_min%2==0:
        push=tmp_min/2
    else:
        push=tmp_min//2+1
     tmp_min%2==0 tmp_min%2 tmp_min 2 0 push=tmp_min/2 push tmp_min/2 tmp_min 2 push=tmp_min//2+1 push tmp_min//2+1 tmp_min//2 tmp_min 2 1 heapq.heappush(a,push) heapq.heappush heapq heappush a push print(int(-sum(a))) print int(-sum(a)) int -sum(a) sum(a) sum a n,m=map(int,input().split()) map(int,input().split()) n tmp_min=heapq.heappop(a) heapq.heappop(a) tmp_min push=tmp_min/2 tmp_min/2 push push=tmp_min//2+1 tmp_min//2+1 push m=map(int,input().split()) map(int,input().split()) m 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):
    tmp_min=heapq.heappop(a)
    if tmp_min%2==0:
        push=tmp_min/2
    else:
        push=tmp_min//2+1
    heapq.heappush(a,push)
print(int(-sum(a)))