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