from bisect import bisect_left as bs
#ソート順序を保ったまま値を挿入する
N, M = map(int,input().split())
A = list(map(int,input().split()))
A.sort()

while M > 0:
  i = A.pop(-1) // 2
  A.insert(bs(A, i), i)
  M -= 1

print(sum(A)) from bisect import bisect_left as bs 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 A.sort() A.sort A sort while M > 0:
  i = A.pop(-1) // 2
  A.insert(bs(A, i), i)
  M -= 1 M > 0 M 0 i = A.pop(-1) // 2 i A.pop(-1) // 2 A.pop(-1) A.pop A pop -1 2 A.insert(bs(A, i), i) A.insert A insert bs(A, i) bs A i i M -= 1 M 1 print(sum(A)) print sum(A) sum A M -= 1 1 M A = list(map(int,input().split())) list(map(int,input().split())) A i = A.pop(-1) // 2 A.pop(-1) // 2 i N, M = map(int,input().split()) map(int,input().split()) N M = map(int,input().split()) map(int,input().split()) M
from bisect import bisect_left as bs
#ソート順序を保ったまま値を挿入する
N, M = map(int,input().split())
A = list(map(int,input().split()))
A.sort()

while M > 0:
  i = A.pop(-1) // 2
  A.insert(bs(A, i), i)
  M -= 1

print(sum(A))