import sys
input=sys.stdin.readline #文字列入力はするな！！
import heapq
n,m=map(int,input().split())
a=[]
for i in input().split():
    heapq.heappush(a,-int(i))
for i in range(m):
    p=-heapq.heappop(a)
    p=p//2
    heapq.heappush(a,-p)
print(-sum(a))
 import sys sys input=sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline import heapq heapq n,m=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m a=[] a [] for i in input().split():
    heapq.heappush(a,-int(i)) i input().split() ().split () input split heapq.heappush(a,-int(i)) heapq.heappush heapq heappush a -int(i) int(i) int i for i in range(m):
    p=-heapq.heappop(a)
    p=p//2
    heapq.heappush(a,-p) i range(m) range m p=-heapq.heappop(a) p -heapq.heappop(a) heapq.heappop(a) heapq.heappop heapq heappop a p=p//2 p p//2 p 2 heapq.heappush(a,-p) heapq.heappush heapq heappush a -p p print(-sum(a)) print -sum(a) sum(a) sum a p=p//2 p//2 p a=[] [] a m=map(int,input().split()) map(int,input().split()) m p=-heapq.heappop(a) -heapq.heappop(a) p n,m=map(int,input().split()) map(int,input().split()) n input=sys.stdin.readline sys.stdin.readline input
import sys
input=sys.stdin.readline #文字列入力はするな！！
import heapq
n,m=map(int,input().split())
a=[]
for i in input().split():
    heapq.heappush(a,-int(i))
for i in range(m):
    p=-heapq.heappop(a)
    p=p//2
    heapq.heappush(a,-p)
print(-sum(a))

