from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))
from heapq import *

n,m=nii()
a=lnii()
a=[-i for i in a]
a.sort(reverse=True)

heapify(a)

for i in range(m):
  x=heappop(a)
  x*=-1
  x//=2
  heappush(a,-x)

print(-sum(a)) from sys import stdin nii=lambda:map(int,stdin.readline().split()) nii lambda:map(int,stdin.readline().split()) map(int,stdin.readline().split()) map int stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split lnii=lambda:list(map(int,stdin.readline().split())) lnii lambda:list(map(int,stdin.readline().split())) list(map(int,stdin.readline().split())) list map(int,stdin.readline().split()) map int stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split from heapq import * n,m=nii() n nii() nii m a=lnii() a lnii() lnii -i for i in a for i in a i a for i in a -i i a=[-i for i in a] a [-i for i in a] a.sort(reverse=True) a.sort a sort reverse=True reverse True heapify(a) heapify a for i in range(m):
  x=heappop(a)
  x*=-1
  x//=2
  heappush(a,-x) i range(m) range m x=heappop(a) x heappop(a) heappop a x*=-1 x -1 x//=2 x 2 heappush(a,-x) heappush a -x x print(-sum(a)) print -sum(a) sum(a) sum a lnii=lambda:list(map(int,stdin.readline().split())) lambda:list(map(int,stdin.readline().split())) lnii x*=-1 -1 x n,m=nii() nii() n x=heappop(a) heappop(a) x a=lnii() lnii() a x//=2 2 x nii=lambda:map(int,stdin.readline().split()) lambda:map(int,stdin.readline().split()) nii m=nii() nii() m a=[-i for i in a] [-i for i in a] a
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))
from heapq import *

n,m=nii()
a=lnii()
a=[-i for i in a]
a.sort(reverse=True)

heapify(a)

for i in range(m):
  x=heappop(a)
  x*=-1
  x//=2
  heappush(a,-x)

print(-sum(a))