import heapq

n,m = map(int,input().split())
a = list(map(lambda x: -int(x),input().split()))
heapq.heapify(a)
for _ in range(m):
    temp = -heapq.heappop(a)
    temp//=2
    heapq.heappush(a,-temp)
ans = 0
for _ in range(n):
    ans -= heapq.heappop(a)
print(ans) 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),input().split())) a list(map(lambda x: -int(x),input().split())) list map(lambda x: -int(x),input().split()) map lambda x: -int(x) -int(x) int(x) int x x input().split() ().split () input split heapq.heapify(a) heapq.heapify heapq heapify a for _ in range(m):
    temp = -heapq.heappop(a)
    temp//=2
    heapq.heappush(a,-temp) _ range(m) range m temp = -heapq.heappop(a) temp -heapq.heappop(a) heapq.heappop(a) heapq.heappop heapq heappop a temp//=2 temp 2 heapq.heappush(a,-temp) heapq.heappush heapq heappush a -temp temp ans = 0 ans 0 for _ in range(n):
    ans -= heapq.heappop(a) _ range(n) range n ans -= heapq.heappop(a) ans heapq.heappop(a) heapq.heappop heapq heappop a print(ans) print ans ans -= heapq.heappop(a) heapq.heappop(a) ans n,m = map(int,input().split()) map(int,input().split()) n temp = -heapq.heappop(a) -heapq.heappop(a) temp a = list(map(lambda x: -int(x),input().split())) list(map(lambda x: -int(x),input().split())) a m = map(int,input().split()) map(int,input().split()) m temp//=2 2 temp ans = 0 0 ans
import heapq

n,m = map(int,input().split())
a = list(map(lambda x: -int(x),input().split()))
heapq.heapify(a)
for _ in range(m):
    temp = -heapq.heappop(a)
    temp//=2
    heapq.heappush(a,-temp)
ans = 0
for _ in range(n):
    ans -= heapq.heappop(a)
print(ans)