import sys
import heapq

sys.setrecursionlimit(10**7)
input = sys.stdin.readline

n, m = map(int, input().split())
a = list(map(int, input().split()))
a = list(map(lambda x: x * (-1), a))

heapq.heapify(a)

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

print(-sum(a)) import sys sys import heapq heapq sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split a = list(map(lambda x: x * (-1), a)) a list(map(lambda x: x * (-1), a)) list map(lambda x: x * (-1), a) map lambda x: x * (-1) x * (-1) x -1 x a heapq.heapify(a) heapq.heapify heapq heapify a for _ in range(m):
    tmp = heapq.heappop(a) * (-1)
    tmp //= 2
    heapq.heappush(a, tmp * (-1)) _ range(m) range m tmp = heapq.heappop(a) * (-1) tmp heapq.heappop(a) * (-1) heapq.heappop(a) heapq.heappop heapq heappop a -1 tmp //= 2 tmp 2 heapq.heappush(a, tmp * (-1)) heapq.heappush heapq heappush a tmp * (-1) tmp -1 print(-sum(a)) print -sum(a) sum(a) sum a a = list(map(lambda x: x * (-1), a)) list(map(lambda x: x * (-1), a)) a tmp = heapq.heappop(a) * (-1) heapq.heappop(a) * (-1) tmp m = map(int, input().split()) map(int, input().split()) m a = list(map(int, input().split())) list(map(int, input().split())) a input = sys.stdin.readline sys.stdin.readline input tmp //= 2 2 tmp n, m = map(int, input().split()) map(int, input().split()) n
import sys
import heapq

sys.setrecursionlimit(10**7)
input = sys.stdin.readline

n, m = map(int, input().split())
a = list(map(int, input().split()))
a = list(map(lambda x: x * (-1), a))

heapq.heapify(a)

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

print(-sum(a))
