import heapq as hq
N,M=list(map(int, input().split()))
A=list(map(int, input().split()))
B=[(-1)*A[i] for i in range(N)]
B.sort()
for _ in range(M):
  a=hq.heappop(B)
  a=((a*(-1))//2)*(-1)
  hq.heappush(B,a)
C=[-B[i] for i in range(N)]
print(sum(C)) import heapq as hq heapq N,M=list(map(int, input().split())) N list(map(int, input().split())) list 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 (-1)*A[i] for i in range(N) for i in range(N) i range(N) range N for i in range(N) (-1)*A[i] -1 A[i] A i B=[(-1)*A[i] for i in range(N)] B [(-1)*A[i] for i in range(N)] B.sort() B.sort B sort for _ in range(M):
  a=hq.heappop(B)
  a=((a*(-1))//2)*(-1)
  hq.heappush(B,a) _ range(M) range M a=hq.heappop(B) a hq.heappop(B) hq.heappop hq heappop B a=((a*(-1))//2)*(-1) a ((a*(-1))//2)*(-1) (a*(-1))//2 a*(-1) a -1 2 -1 hq.heappush(B,a) hq.heappush hq heappush B a -B[i] for i in range(N) for i in range(N) i range(N) range N for i in range(N) -B[i] B[i] B i C=[-B[i] for i in range(N)] C [-B[i] for i in range(N)] print(sum(C)) print sum(C) sum C A=list(map(int, input().split())) list(map(int, input().split())) A a=((a*(-1))//2)*(-1) ((a*(-1))//2)*(-1) a C=[-B[i] for i in range(N)] [-B[i] for i in range(N)] C M=list(map(int, input().split())) list(map(int, input().split())) M N,M=list(map(int, input().split())) list(map(int, input().split())) N a=hq.heappop(B) hq.heappop(B) a B=[(-1)*A[i] for i in range(N)] [(-1)*A[i] for i in range(N)] B
import heapq as hq
N,M=list(map(int, input().split()))
A=list(map(int, input().split()))
B=[(-1)*A[i] for i in range(N)]
B.sort()
for _ in range(M):
  a=hq.heappop(B)
  a=((a*(-1))//2)*(-1)
  hq.heappush(B,a)
C=[-B[i] for i in range(N)]
print(sum(C))