N,M = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
import bisect
for i in range(M):
    bisect.insort(A,A[-1]/2)
    A.pop(-1)
for i in range(N):
    A[i] = int(A[i])
print(sum(A)) 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 A.sort() A.sort A sort import bisect bisect for i in range(M):
    bisect.insort(A,A[-1]/2)
    A.pop(-1) i range(M) range M bisect.insort(A,A[-1]/2) bisect.insort bisect insort A A[-1]/2 A[-1] A -1 2 A.pop(-1) A.pop A pop -1 for i in range(N):
    A[i] = int(A[i]) i range(N) range N A[i] = int(A[i]) A[i] A i int(A[i]) int A[i] A i print(sum(A)) print sum(A) sum A M = map(int,input().split()) map(int,input().split()) M A = list(map(int,input().split())) list(map(int,input().split())) A N,M = map(int,input().split()) map(int,input().split()) N
N,M = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
import bisect
for i in range(M):
    bisect.insort(A,A[-1]/2)
    A.pop(-1)
for i in range(N):
    A[i] = int(A[i])
print(sum(A))