n,k=list(map(int,input().split()))
m=list(map(int,input().split()))
for i in range(n):
    m[i]*=(-1)

import heapq
heapq.heapify(m)
for i in range(k):
    p=heapq.heappop(m)
    heapq.heappush(m,p/2)
s=0
for i in range(n):
    s+=int(abs(m[i]))
print(s) n,k=list(map(int,input().split())) n list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split k m=list(map(int,input().split())) m list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split for i in range(n):
    m[i]*=(-1) i range(n) range n m[i]*=(-1) m[i] m i -1 import heapq heapq heapq.heapify(m) heapq.heapify heapq heapify m for i in range(k):
    p=heapq.heappop(m)
    heapq.heappush(m,p/2) i range(k) range k p=heapq.heappop(m) p heapq.heappop(m) heapq.heappop heapq heappop m heapq.heappush(m,p/2) heapq.heappush heapq heappush m p/2 p 2 s=0 s 0 for i in range(n):
    s+=int(abs(m[i])) i range(n) range n s+=int(abs(m[i])) s int(abs(m[i])) int abs(m[i]) abs m[i] m i print(s) print s n,k=list(map(int,input().split())) list(map(int,input().split())) n k=list(map(int,input().split())) list(map(int,input().split())) k s=0 0 s p=heapq.heappop(m) heapq.heappop(m) p m=list(map(int,input().split())) list(map(int,input().split())) m s+=int(abs(m[i])) int(abs(m[i])) s
n,k=list(map(int,input().split()))
m=list(map(int,input().split()))
for i in range(n):
    m[i]*=(-1)

import heapq
heapq.heapify(m)
for i in range(k):
    p=heapq.heappop(m)
    heapq.heappush(m,p/2)
s=0
for i in range(n):
    s+=int(abs(m[i]))
print(s)