#!/usr/bin/env python3

import heapq

n, m, *a = map(int, open(0).read().split())

a = [*map(lambda x: -x, a)]
heapq.heapify(a)
for _ in range(m):
    heapq.heappush(a, -(-heapq.heappop(a) >> 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 = [*map(lambda x: -x, a)] a [*map(lambda x: -x, a)] *map(lambda x: -x, a) map(lambda x: -x, a) map lambda x: -x -x x x a heapq.heapify(a) heapq.heapify heapq heapify a for _ in range(m):
    heapq.heappush(a, -(-heapq.heappop(a) >> 1)) _ range(m) range m heapq.heappush(a, -(-heapq.heappop(a) >> 1)) heapq.heappush heapq heappush a -(-heapq.heappop(a) >> 1) -heapq.heappop(a) >> 1 -heapq.heappop(a) heapq.heappop(a) heapq.heappop heapq heappop a 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 = [*map(lambda x: -x, a)] [*map(lambda x: -x, a)] a n, m, *a = map(int, open(0).read().split()) map(int, open(0).read().split()) n
#!/usr/bin/env python3

import heapq

n, m, *a = map(int, open(0).read().split())

a = [*map(lambda x: -x, a)]
heapq.heapify(a)
for _ in range(m):
    heapq.heappush(a, -(-heapq.heappop(a) >> 1))
print(-sum(a))
