from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
INT_MIN=-10**13
import bisect as B
###############################################################################\
n,m=INPUT()
A=INPUT()
A.sort()
for _ in range(m):
    B.insort(A,A.pop()//2)
print(sum(A)) from sys import stdin,stdout def INPUT():return list(int(i) for i in stdin.readline().split()) INPUT def inp():return stdin.readline() inp def out(x):return stdout.write(x) out x x import math math INT_MIN=-10**13 INT_MIN -10**13 -10 13 import bisect as B bisect n,m=INPUT() n INPUT() INPUT m A=INPUT() A INPUT() INPUT A.sort() A.sort A sort for _ in range(m):
    B.insort(A,A.pop()//2) _ range(m) range m B.insort(A,A.pop()//2) B.insort B insort A A.pop()//2 A.pop() A.pop A pop 2 print(sum(A)) print sum(A) sum A m=INPUT() INPUT() m def inp():return stdin.readline() def inp():return stdin.readline() inp A=INPUT() INPUT() A def INPUT():return list(int(i) for i in stdin.readline().split()) def INPUT():return list(int(i) for i in stdin.readline().split()) INPUT n,m=INPUT() INPUT() n def out(x):return stdout.write(x) def out(x):return stdout.write(x) out INT_MIN=-10**13 -10**13 INT_MIN
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
INT_MIN=-10**13
import bisect as B
###############################################################################\
n,m=INPUT()
A=INPUT()
A.sort()
for _ in range(m):
    B.insort(A,A.pop()//2)
print(sum(A))
