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