from heapq import *
N,M = map(int,input().split())
A = list(map(lambda x:-int(x),input().split()))
heapify(A)

for m in range(M):
  heappush(A,int(heappop(A)/2))

print(-sum(A)) from heapq import * 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 heapify(A) heapify A for m in range(M):
  heappush(A,int(heappop(A)/2)) m range(M) range M heappush(A,int(heappop(A)/2)) heappush A int(heappop(A)/2) int heappop(A)/2 heappop(A) heappop A 2 print(-sum(A)) print -sum(A) sum(A) sum A N,M = map(int,input().split()) map(int,input().split()) N M = map(int,input().split()) map(int,input().split()) M A = list(map(lambda x:-int(x),input().split())) list(map(lambda x:-int(x),input().split())) A
from heapq import *
N,M = map(int,input().split())
A = list(map(lambda x:-int(x),input().split()))
heapify(A)

for m in range(M):
  heappush(A,int(heappop(A)/2))

print(-sum(A))