import heapq
n, m = map(int, input().split())
a = list(map(int, input().split()))
if n == 1:
    print(a[0] // (2 ** m))
    exit()
a = list(map(lambda x: x * (-1), a))
heapq.heapify(a)
while m > 0:
    m -= 1
    i = heapq.heappop(a) * (-1)
    i //= 2
    heapq.heappush(a, i * (-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 a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split if n == 1:
    print(a[0] // (2 ** m))
    exit() n == 1 n 1 print(a[0] // (2 ** m)) print a[0] // (2 ** m) a[0] a 0 2 ** m 2 m exit() exit 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 while m > 0:
    m -= 1
    i = heapq.heappop(a) * (-1)
    i //= 2
    heapq.heappush(a, i * (-1)) m > 0 m 0 m -= 1 m 1 i = heapq.heappop(a) * (-1) i heapq.heappop(a) * (-1) heapq.heappop(a) heapq.heappop heapq heappop a -1 i //= 2 i 2 heapq.heappush(a, i * (-1)) heapq.heappush heapq heappush a i * (-1) i -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 i //= 2 2 i m -= 1 1 m i = heapq.heappop(a) * (-1) heapq.heappop(a) * (-1) i a = list(map(lambda x: x * (-1), a)) list(map(lambda x: x * (-1), a)) a a = list(map(int, input().split())) list(map(int, input().split())) a m = map(int, input().split()) map(int, input().split()) m
import heapq
n, m = map(int, input().split())
a = list(map(int, input().split()))
if n == 1:
    print(a[0] // (2 ** m))
    exit()
a = list(map(lambda x: x * (-1), a))
heapq.heapify(a)
while m > 0:
    m -= 1
    i = heapq.heappop(a) * (-1)
    i //= 2
    heapq.heappush(a, i * (-1))

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