from heapq import heappush, heappop, heapify

def neg_int(n):
    return -int(n)
    
N, M = map(int, input().split())
a_list = list(map(neg_int, input().split()))
heapify(a_list)
for _ in range(M):
    a = -heappop(a_list)
    a //= 2
    heappush(a_list, -a)
print(-sum(a_list)) from heapq import heappush, heappop, heapify def neg_int(n):
    return -int(n)
     neg_int return -int(n) -int(n) int(n) int n n n N, M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M a_list = list(map(neg_int, input().split())) a_list list(map(neg_int, input().split())) list map(neg_int, input().split()) map neg_int input().split() ().split () input split heapify(a_list) heapify a_list for _ in range(M):
    a = -heappop(a_list)
    a //= 2
    heappush(a_list, -a) _ range(M) range M a = -heappop(a_list) a -heappop(a_list) heappop(a_list) heappop a_list a //= 2 a 2 heappush(a_list, -a) heappush a_list -a a print(-sum(a_list)) print -sum(a_list) sum(a_list) sum a_list a_list = list(map(neg_int, input().split())) list(map(neg_int, input().split())) a_list M = map(int, input().split()) map(int, input().split()) M a = -heappop(a_list) -heappop(a_list) a def neg_int(n):
    return -int(n)
     def neg_int(n):
    return -int(n)
     neg_int N, M = map(int, input().split()) map(int, input().split()) N a //= 2 2 a
from heapq import heappush, heappop, heapify

def neg_int(n):
    return -int(n)
    
N, M = map(int, input().split())
a_list = list(map(neg_int, input().split()))
heapify(a_list)
for _ in range(M):
    a = -heappop(a_list)
    a //= 2
    heappush(a_list, -a)
print(-sum(a_list))