import bisect
N, M = map(int, input().split())
A = sorted(map(int, input().split()))
for _ in range(M):
    x = A.pop()
    y = x // 2
    i = bisect.bisect_left(A, y)
    A.insert(i, y)
ans = sum(A)
print(ans) import bisect bisect N, M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M A = sorted(map(int, input().split())) A sorted(map(int, input().split())) sorted map(int, input().split()) map int input().split() ().split () input split for _ in range(M):
    x = A.pop()
    y = x // 2
    i = bisect.bisect_left(A, y)
    A.insert(i, y) _ range(M) range M x = A.pop() x A.pop() A.pop A pop y = x // 2 y x // 2 x 2 i = bisect.bisect_left(A, y) i bisect.bisect_left(A, y) bisect.bisect_left bisect bisect_left A y A.insert(i, y) A.insert A insert i y ans = sum(A) ans sum(A) sum A print(ans) print ans ans = sum(A) sum(A) ans N, M = map(int, input().split()) map(int, input().split()) N M = map(int, input().split()) map(int, input().split()) M x = A.pop() A.pop() x i = bisect.bisect_left(A, y) bisect.bisect_left(A, y) i A = sorted(map(int, input().split())) sorted(map(int, input().split())) A y = x // 2 x // 2 y
import bisect
N, M = map(int, input().split())
A = sorted(map(int, input().split()))
for _ in range(M):
    x = A.pop()
    y = x // 2
    i = bisect.bisect_left(A, y)
    A.insert(i, y)
ans = sum(A)
print(ans)