import heapq

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

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



heap = []

for i in a:

    heapq.heappush(heap, -i)





for i in range(m):

    x = - heapq.heappop(heap)

    x = x / 2

    heapq.heappush(heap, - x)







print((sum([int (-n) for n in heap])))

import heapq

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

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



heap = []

for i in a:

    heapq.heappush(heap, -i)





for i in range(m):

    x = - heapq.heappop(heap)

    x = x // 2

    heapq.heappush(heap, - x)







print((sum([int (-n) for n in heap])))

import heapq

n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
heap = []
for i in a:
    heapq.heappush(heap, -i)
for i in range(m):
    x = -heapq.heappop(heap)
    x = x / 2
    heapq.heappush(heap, -x)
print((sum([int(-n) for n in heap])))

import heapq

n, m = list(map(int, input().split()))
a = list(map(int, input().split()))
heap = []
for i in a:
    heapq.heappush(heap, -i)
for i in range(m):
    x = -heapq.heappop(heap)
    x = x // 2
    heapq.heappush(heap, -x)
print((sum([int(-n) for n in heap])))

-    x = x / 2 +    x = x // 2