import heapq
n,m=map(int,input().split())
a=list(map(int,input().split()))
b=[]
for y in a:
  b.append(y*(-1))

heapq.heapify(b)
for x in range(m):
  c=heapq.heappop(b)*(-1)
  d=(c//2)*(-1)
  heapq.heappush(b,d)
  
sum1=sum(b)*(-1)
print(sum1)
 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(int,input().split())) a list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split b=[] b [] for y in a:
  b.append(y*(-1)) y a b.append(y*(-1)) b.append b append y*(-1) y -1 heapq.heapify(b) heapq.heapify heapq heapify b for x in range(m):
  c=heapq.heappop(b)*(-1)
  d=(c//2)*(-1)
  heapq.heappush(b,d)
   x range(m) range m c=heapq.heappop(b)*(-1) c heapq.heappop(b)*(-1) heapq.heappop(b) heapq.heappop heapq heappop b -1 d=(c//2)*(-1) d (c//2)*(-1) c//2 c 2 -1 heapq.heappush(b,d) heapq.heappush heapq heappush b d sum1=sum(b)*(-1) sum1 sum(b)*(-1) sum(b) sum b -1 print(sum1) print sum1 n,m=map(int,input().split()) map(int,input().split()) n sum1=sum(b)*(-1) sum(b)*(-1) sum1 b=[] [] b m=map(int,input().split()) map(int,input().split()) m a=list(map(int,input().split())) list(map(int,input().split())) a c=heapq.heappop(b)*(-1) heapq.heappop(b)*(-1) c d=(c//2)*(-1) (c//2)*(-1) d
import heapq
n,m=map(int,input().split())
a=list(map(int,input().split()))
b=[]
for y in a:
  b.append(y*(-1))

heapq.heapify(b)
for x in range(m):
  c=heapq.heappop(b)*(-1)
  d=(c//2)*(-1)
  heapq.heappush(b,d)
  
sum1=sum(b)*(-1)
print(sum1)

