import heapq
n, m  = map(int, input().split())
A = list(map(lambda x: -int(x), input().split()))
heapq.heapify(A)
for i in range(m):
    a = heapq.heappop(A)
    heapq.heappush(A, a/2)
print(sum([-int(a) for a in A])) 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(lambda x: -int(x), input().split())) A list(map(lambda x: -int(x), input().split())) list map(lambda x: -int(x), input().split()) map lambda x: -int(x) -int(x) int(x) int x x input().split() ().split () input split heapq.heapify(A) heapq.heapify heapq heapify A for i in range(m):
    a = heapq.heappop(A)
    heapq.heappush(A, a/2) i range(m) range m a = heapq.heappop(A) a heapq.heappop(A) heapq.heappop heapq heappop A heapq.heappush(A, a/2) heapq.heappush heapq heappush A a/2 a 2 -int(a) for a in A for a in A a A for a in A -int(a) int(a) int a print(sum([-int(a) for a in A])) print sum([-int(a) for a in A]) sum [-int(a) for a in A] A = list(map(lambda x: -int(x), input().split())) list(map(lambda x: -int(x), input().split())) A n, m  = map(int, input().split()) map(int, input().split()) n a = heapq.heappop(A) heapq.heappop(A) a m  = map(int, input().split()) map(int, input().split()) m
import heapq
n, m  = map(int, input().split())
A = list(map(lambda x: -int(x), input().split()))
heapq.heapify(A)
for i in range(m):
    a = heapq.heappop(A)
    heapq.heappush(A, a/2)
print(sum([-int(a) for a in A]))