# from pprint import pprint
import math

# import collections

# n = int(input())
n, m = map(int, input().split(' '))
a = list(map(lambda x: int(x) * (-1), input().split(' ')))
# a = sorted(a, reverse=True)
# b = [math.log2(_a) for _a in a]


import heapq

q_a = heapq.heapify(a)

for m in range(m):
    x = heapq.heappop(a) * (-1)
    heapq.heappush(a, (x // 2) * (-1))

print(sum(a) * (-1)) import math math n, m = map(int, input().split(' ')) n map(int, input().split(' ')) map int input().split(' ') ().split () input split ' ' m a = list(map(lambda x: int(x) * (-1), input().split(' '))) a list(map(lambda x: int(x) * (-1), input().split(' '))) list map(lambda x: int(x) * (-1), input().split(' ')) map lambda x: int(x) * (-1) int(x) * (-1) int(x) int x -1 x input().split(' ') ().split () input split ' ' import heapq heapq q_a = heapq.heapify(a) q_a heapq.heapify(a) heapq.heapify heapq heapify a for m in range(m):
    x = heapq.heappop(a) * (-1)
    heapq.heappush(a, (x // 2) * (-1)) m range(m) range m x = heapq.heappop(a) * (-1) x heapq.heappop(a) * (-1) heapq.heappop(a) heapq.heappop heapq heappop a -1 heapq.heappush(a, (x // 2) * (-1)) heapq.heappush heapq heappush a (x // 2) * (-1) x // 2 x 2 -1 print(sum(a) * (-1)) print sum(a) * (-1) sum(a) sum a -1 n, m = map(int, input().split(' ')) map(int, input().split(' ')) n m = map(int, input().split(' ')) map(int, input().split(' ')) m q_a = heapq.heapify(a) heapq.heapify(a) q_a a = list(map(lambda x: int(x) * (-1), input().split(' '))) list(map(lambda x: int(x) * (-1), input().split(' '))) a x = heapq.heappop(a) * (-1) heapq.heappop(a) * (-1) x
# from pprint import pprint
import math

# import collections

# n = int(input())
n, m = map(int, input().split(' '))
a = list(map(lambda x: int(x) * (-1), input().split(' ')))
# a = sorted(a, reverse=True)
# b = [math.log2(_a) for _a in a]


import heapq

q_a = heapq.heapify(a)

for m in range(m):
    x = heapq.heappop(a) * (-1)
    heapq.heappush(a, (x // 2) * (-1))

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