from heapq import *
N, M = map(int, input().split())
A = []
for a in map(int, input().split()):
    heappush(A, -a)
for _ in range(M):
    x = -heappop(A)
    x //= 2
    heappush(A, -x)
print(-sum(A)) from heapq import * N, M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M A = [] A [] for a in map(int, input().split()):
    heappush(A, -a) a map(int, input().split()) map int input().split() ().split () input split heappush(A, -a) heappush A -a a for _ in range(M):
    x = -heappop(A)
    x //= 2
    heappush(A, -x) _ range(M) range M x = -heappop(A) x -heappop(A) heappop(A) heappop A x //= 2 x 2 heappush(A, -x) heappush A -x x print(-sum(A)) print -sum(A) sum(A) sum A x = -heappop(A) -heappop(A) x x //= 2 2 x N, M = map(int, input().split()) map(int, input().split()) N M = map(int, input().split()) map(int, input().split()) M A = [] [] A
from heapq import *
N, M = map(int, input().split())
A = []
for a in map(int, input().split()):
    heappush(A, -a)
for _ in range(M):
    x = -heappop(A)
    x //= 2
    heappush(A, -x)
print(-sum(A))