import heapq

I = input().split()
N = int(I[0])
M = int(I[1])
# N: 品物の数
# M: 割引券の数
# A: 品物の値段行列
A = list(map(int , input().split()))

A = list(map(lambda x: x*(-1), A))

heapq.heapify(A)
for i in range(M):
    M -= 1
    pri = heapq.heappop(A)

    pri *= -1
    pri //= 2
    pri *= -1

    heapq.heappush( A , pri )

Fi_pri = 0
for i in range(N):
    Fi_pri += A[i]

print( -1 * Fi_pri ) import heapq heapq I = input().split() I input().split() ().split () input split N = int(I[0]) N int(I[0]) int I[0] I 0 M = int(I[1]) M int(I[1]) int I[1] I 1 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 i in range(M):
    M -= 1
    pri = heapq.heappop(A)

    pri *= -1
    pri //= 2
    pri *= -1

    heapq.heappush( A , pri ) i range(M) range M M -= 1 M 1 pri = heapq.heappop(A) pri heapq.heappop(A) heapq.heappop heapq heappop A pri *= -1 pri -1 pri //= 2 pri 2 pri *= -1 pri -1 heapq.heappush( A , pri ) heapq.heappush heapq heappush A pri Fi_pri = 0 Fi_pri 0 for i in range(N):
    Fi_pri += A[i] i range(N) range N Fi_pri += A[i] Fi_pri A[i] A i print( -1 * Fi_pri ) print -1 * Fi_pri -1 Fi_pri I = input().split() input().split() I pri //= 2 2 pri M -= 1 1 M pri *= -1 -1 pri N = int(I[0]) int(I[0]) N A = list(map(lambda x: x*(-1), A)) list(map(lambda x: x*(-1), A)) A Fi_pri = 0 0 Fi_pri Fi_pri += A[i] A[i] Fi_pri A = list(map(int , input().split())) list(map(int , input().split())) A pri = heapq.heappop(A) heapq.heappop(A) pri M = int(I[1]) int(I[1]) M pri *= -1 -1 pri
import heapq

I = input().split()
N = int(I[0])
M = int(I[1])
# N: 品物の数
# M: 割引券の数
# A: 品物の値段行列
A = list(map(int , input().split()))

A = list(map(lambda x: x*(-1), A))

heapq.heapify(A)
for i in range(M):
    M -= 1
    pri = heapq.heappop(A)

    pri *= -1
    pri //= 2
    pri *= -1

    heapq.heappush( A , pri )

Fi_pri = 0
for i in range(N):
    Fi_pri += A[i]

print( -1 * Fi_pri )