inp=list(map(int,input().split()))
m=inp[1]
inp=list(map(int,input().split()))
ans=0
inp=[-1*item for item in inp]
import heapq
heapq.heapify(inp)
while m>0:
    a=heapq.heappop(inp)
    a*=-1
    x=a//2
    heapq.heappush(inp,-1*x)
    m-=1
print (-1*sum(inp)) inp=list(map(int,input().split())) inp list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split m=inp[1] m inp[1] inp 1 inp=list(map(int,input().split())) inp list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split ans=0 ans 0 -1*item for item in inp for item in inp item inp for item in inp -1*item -1 item inp=[-1*item for item in inp] inp [-1*item for item in inp] import heapq heapq heapq.heapify(inp) heapq.heapify heapq heapify inp while m>0:
    a=heapq.heappop(inp)
    a*=-1
    x=a//2
    heapq.heappush(inp,-1*x)
    m-=1 m>0 m 0 a=heapq.heappop(inp) a heapq.heappop(inp) heapq.heappop heapq heappop inp a*=-1 a -1 x=a//2 x a//2 a 2 heapq.heappush(inp,-1*x) heapq.heappush heapq heappush inp -1*x -1 x m-=1 m 1 print (-1*sum(inp)) print -1*sum(inp) -1 sum(inp) sum inp x=a//2 a//2 x inp=list(map(int,input().split())) list(map(int,input().split())) inp inp=list(map(int,input().split())) list(map(int,input().split())) inp m=inp[1] inp[1] m inp=[-1*item for item in inp] [-1*item for item in inp] inp m-=1 1 m ans=0 0 ans a*=-1 -1 a a=heapq.heappop(inp) heapq.heappop(inp) a
inp=list(map(int,input().split()))
m=inp[1]
inp=list(map(int,input().split()))
ans=0
inp=[-1*item for item in inp]
import heapq
heapq.heapify(inp)
while m>0:
    a=heapq.heappop(inp)
    a*=-1
    x=a//2
    heapq.heappush(inp,-1*x)
    m-=1
print (-1*sum(inp))