n,m=map(int,input().split())
a = list(map(int,input().split()))

for i in range(n):
    a[i]*=-1

import heapq,math

heapq.heapify(a)

for _ in range(m):
    b=heapq.heappop(a)*(-1)
    b //=2

    heapq.heappush(a,b*(-1))

print(sum(a)*(-1)) 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 for i in range(n):
    a[i]*=-1 i range(n) range n a[i]*=-1 a[i] a i -1 import heapq,math heapq math heapq.heapify(a) heapq.heapify heapq heapify a for _ in range(m):
    b=heapq.heappop(a)*(-1)
    b //=2

    heapq.heappush(a,b*(-1)) _ range(m) range m b=heapq.heappop(a)*(-1) b heapq.heappop(a)*(-1) heapq.heappop(a) heapq.heappop heapq heappop a -1 b //=2 b 2 heapq.heappush(a,b*(-1)) heapq.heappush heapq heappush a b*(-1) b -1 print(sum(a)*(-1)) print sum(a)*(-1) sum(a) sum a -1 b=heapq.heappop(a)*(-1) heapq.heappop(a)*(-1) b b //=2 2 b n,m=map(int,input().split()) map(int,input().split()) n m=map(int,input().split()) map(int,input().split()) m a = list(map(int,input().split())) list(map(int,input().split())) a
n,m=map(int,input().split())
a = list(map(int,input().split()))

for i in range(n):
    a[i]*=-1

import heapq,math

heapq.heapify(a)

for _ in range(m):
    b=heapq.heappop(a)*(-1)
    b //=2

    heapq.heappush(a,b*(-1))

print(sum(a)*(-1))