import heapq as hq

import math



def discount(price):

    return math.ceil(price / 2)



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

A = list([int(x)* -1 for x in input().split()])

hq.heapify(A)



for _ in range(M):

    a = discount(hq.heappop(A))

    hq.heappush(A,a)



print((sum(A)* -1))
import heapq as hq

import math



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

A = list([int(x)* -1 for x in input().split()])

hq.heapify(A)



for _ in range(M):

    a = math.ceil(hq.heappop(A) / 2)

    hq.heappush(A,a)



print((sum(A)* -1))
import heapq as hq
import math


def discount(price):
    return math.ceil(price / 2)


N, M = list(map(int, input().split()))
A = list([int(x) * -1 for x in input().split()])
hq.heapify(A)
for _ in range(M):
    a = discount(hq.heappop(A))
    hq.heappush(A, a)
print((sum(A) * -1))

import heapq as hq
import math

N, M = list(map(int, input().split()))
A = list([int(x) * -1 for x in input().split()])
hq.heapify(A)
for _ in range(M):
    a = math.ceil(hq.heappop(A) / 2)
    hq.heappush(A, a)
print((sum(A) * -1))

- - -def discount(price): -    return math.ceil(price / 2) - -    a = discount(hq.heappop(A)) +    a = math.ceil(hq.heappop(A) / 2)