import heapq
n, m, *a = map(int, open(0).read().split())
a = list(map(lambda x: -x, a))

heapq.heapify(a)
for i in range(m):
    b = -heapq.heappop(a)
    heapq.heappush(a, -(b >> 1))

print(-sum(a)) import heapq heapq n, m, *a = map(int, open(0).read().split()) n map(int, open(0).read().split()) map int open(0).read().split() (0).read().split (0).read() (0).read (0) open 0 read split m *a a a = list(map(lambda x: -x, a)) a list(map(lambda x: -x, a)) list map(lambda x: -x, a) map lambda x: -x -x x x a heapq.heapify(a) heapq.heapify heapq heapify a for i in range(m):
    b = -heapq.heappop(a)
    heapq.heappush(a, -(b >> 1)) i range(m) range m b = -heapq.heappop(a) b -heapq.heappop(a) heapq.heappop(a) heapq.heappop heapq heappop a heapq.heappush(a, -(b >> 1)) heapq.heappush heapq heappush a -(b >> 1) b >> 1 b 1 print(-sum(a)) print -sum(a) sum(a) sum a m, *a = map(int, open(0).read().split()) map(int, open(0).read().split()) m a = list(map(lambda x: -x, a)) list(map(lambda x: -x, a)) a n, m, *a = map(int, open(0).read().split()) map(int, open(0).read().split()) n b = -heapq.heappop(a) -heapq.heappop(a) b
import heapq
n, m, *a = map(int, open(0).read().split())
a = list(map(lambda x: -x, a))

heapq.heapify(a)
for i in range(m):
    b = -heapq.heappop(a)
    heapq.heappush(a, -(b >> 1))

print(-sum(a))
