from heapq import heapify, heappop, heappush
 
N, M = map(int, input().split())
A = [-1*int(i) for i in input().split()]

heapify(A)

for i in range(M):
    n = -1 * heappop(A)
    heappush(A, -1*(n//2))
    #print(n, A)
 
print(-1*sum(A)) from heapq import heapify, heappop, heappush N, M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M -1*int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() -1*int(i) -1 int(i) int i A = [-1*int(i) for i in input().split()] A [-1*int(i) for i in input().split()] heapify(A) heapify A for i in range(M):
    n = -1 * heappop(A)
    heappush(A, -1*(n//2))
    #print(n, A)
  i range(M) range M n = -1 * heappop(A) n -1 * heappop(A) -1 heappop(A) heappop A heappush(A, -1*(n//2)) heappush A -1*(n//2) -1 n//2 n 2 print(-1*sum(A)) print -1*sum(A) -1 sum(A) sum A M = map(int, input().split()) map(int, input().split()) M n = -1 * heappop(A) -1 * heappop(A) n N, M = map(int, input().split()) map(int, input().split()) N A = [-1*int(i) for i in input().split()] [-1*int(i) for i in input().split()] A
from heapq import heapify, heappop, heappush
 
N, M = map(int, input().split())
A = [-1*int(i) for i in input().split()]

heapify(A)

for i in range(M):
    n = -1 * heappop(A)
    heappush(A, -1*(n//2))
    #print(n, A)
 
print(-1*sum(A))