import heapq

n, m = list(map(int, input().split()))

a = list(map(int, input().split()))

a = list([x * (-1) for x in a])

heapq.heapify(a)

while m != 0:

    price = heapq.heappop(a)

    price = price/2

    m -= 1

    heapq.heappush(a, price)



for i in range(len(a)):

    a[i] = int(a[i])

print((sum(a) * (-1)))
import heapq

n, m = list(map(int, input().split()))

a = list(map(int, input().split()))



for i in range(len(a)):

    a[i] = a[i]*-1.0



heapq.heapify(a)

while m != 0:

    price = heapq.heappop(a)

    price = price/2

    m -= 1

    heapq.heappush(a, price)



for i in range(len(a)):

    a[i] = int(a[i])

    

print((sum(a) * (-1)))
import heapq

n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
a = list([x * (-1) for x in a])
heapq.heapify(a)
while m != 0:
    price = heapq.heappop(a)
    price = price / 2
    m -= 1
    heapq.heappush(a, price)
for i in range(len(a)):
    a[i] = int(a[i])
print((sum(a) * (-1)))

import heapq

n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
for i in range(len(a)):
    a[i] = a[i] * -1.0
heapq.heapify(a)
while m != 0:
    price = heapq.heappop(a)
    price = price / 2
    m -= 1
    heapq.heappush(a, price)
for i in range(len(a)):
    a[i] = int(a[i])
print((sum(a) * (-1)))

-a = list([x * (-1) for x in a]) +for i in range(len(a)): +    a[i] = a[i] * -1.0