from bisect import bisect

N,M = map(int,input().split())
Ali = list(map(int,input().split()))

Ali.sort()
for i in range(M):
  a = Ali.pop(-1)
  a //= 2
  Ali.insert(bisect(Ali,a), a)

print(sum(Ali)) from bisect import bisect N,M = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split M Ali = list(map(int,input().split())) Ali list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split Ali.sort() Ali.sort Ali sort for i in range(M):
  a = Ali.pop(-1)
  a //= 2
  Ali.insert(bisect(Ali,a), a) i range(M) range M a = Ali.pop(-1) a Ali.pop(-1) Ali.pop Ali pop -1 a //= 2 a 2 Ali.insert(bisect(Ali,a), a) Ali.insert Ali insert bisect(Ali,a) bisect Ali a a print(sum(Ali)) print sum(Ali) sum Ali a //= 2 2 a M = map(int,input().split()) map(int,input().split()) M N,M = map(int,input().split()) map(int,input().split()) N a = Ali.pop(-1) Ali.pop(-1) a Ali = list(map(int,input().split())) list(map(int,input().split())) Ali
from bisect import bisect

N,M = map(int,input().split())
Ali = list(map(int,input().split()))

Ali.sort()
for i in range(M):
  a = Ali.pop(-1)
  a //= 2
  Ali.insert(bisect(Ali,a), a)

print(sum(Ali))