# ABC141D - Powerful Discount Tickets
from heapq import heapify, heappop, heappush


def main():
    _, M = map(int, input().split())
    A = [-i for i in map(int, input().split())]
    heapify(A)

    discount = lambda: heappush(A, -(-heappop(A) // 2))
    for _ in range(M):
        discount()

    print(-sum(A))


if __name__ == "__main__":
    main() from heapq import heapify, heappop, heappush def main():
    _, M = map(int, input().split())
    A = [-i for i in map(int, input().split())]
    heapify(A)

    discount = lambda: heappush(A, -(-heappop(A) // 2))
    for _ in range(M):
        discount()

    print(-sum(A)) main _, M = map(int, input().split()) _ map(int, input().split()) map int input().split() ().split () input split M -i for i in map(int, input().split()) for i in map(int, input().split()) i map(int, input().split()) map int input().split() ().split () input split for i in map(int, input().split()) -i i A = [-i for i in map(int, input().split())] A [-i for i in map(int, input().split())] heapify(A) heapify A discount = lambda: heappush(A, -(-heappop(A) // 2)) discount lambda: heappush(A, -(-heappop(A) // 2)) heappush(A, -(-heappop(A) // 2)) heappush A -(-heappop(A) // 2) -heappop(A) // 2 -heappop(A) heappop(A) heappop A 2 for _ in range(M):
        discount()

     _ range(M) range M discount() discount print(-sum(A)) print -sum(A) sum(A) sum A if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    _, M = map(int, input().split())
    A = [-i for i in map(int, input().split())]
    heapify(A)

    discount = lambda: heappush(A, -(-heappop(A) // 2))
    for _ in range(M):
        discount()

    print(-sum(A)) def main():
    _, M = map(int, input().split())
    A = [-i for i in map(int, input().split())]
    heapify(A)

    discount = lambda: heappush(A, -(-heappop(A) // 2))
    for _ in range(M):
        discount()

    print(-sum(A)) main
# ABC141D - Powerful Discount Tickets
from heapq import heapify, heappop, heappush


def main():
    _, M = map(int, input().split())
    A = [-i for i in map(int, input().split())]
    heapify(A)

    discount = lambda: heappush(A, -(-heappop(A) // 2))
    for _ in range(M):
        discount()

    print(-sum(A))


if __name__ == "__main__":
    main()
