from heapq import heappop, heappush

N,M=map(int,input().split())
A=list(map(int,input().split()))

B = []
for i in range(N):
  heappush(B,-A[i])

for i in range(M):
  a = heappop(B)
  a /= 2
  heappush(B,a)

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

N,M=map(int,input().split())
A=list(map(int,input().split()))

B = []
for i in range(N):
  heappush(B,-A[i])

for i in range(M):
  a = heappop(B)
  a /= 2
  heappush(B,a)

print(sum([int(-B[i]) for i in range(N)]))