rr = raw_input

rri = lambda: int(input())

rrm = lambda: list(map(int, input().split()))



import heapq

def solve(N, M, A):

    pq = [-x for x in A]

    heapq.heapify(pq)



    for _ in range(M):

        x = -heapq.heappop(pq)

        x /= 2

        heapq.heappush(pq, -x)

    return -sum(pq)





N, M = rrm()

print(solve(N, M, rrm()))

import heapq

readints = lambda: list(map(int, input().split()))



def solve(N, M, A):

    pq = [-x for x in A]

    heapq.heapify(pq)

 

    for _ in range(M):

        x = -heapq.heappop(pq)

        x /= 2

        heapq.heappush(pq, -x)

    return -sum(pq)



N, M = readints()

print(solve(N, M, readints()))

rr = raw_input
rri = lambda: int(input())
rrm = lambda: list(map(int, input().split()))
import heapq


def solve(N, M, A):
    pq = [-x for x in A]
    heapq.heapify(pq)
    for _ in range(M):
        x = -heapq.heappop(pq)
        x /= 2
        heapq.heappush(pq, -x)
    return -sum(pq)


N, M = rrm()
print(solve(N, M, rrm()))

import heapq

readints = lambda: list(map(int, input().split()))


def solve(N, M, A):
    pq = [-x for x in A]
    heapq.heapify(pq)
    for _ in range(M):
        x = -heapq.heappop(pq)
        x /= 2
        heapq.heappush(pq, -x)
    return -sum(pq)


N, M = readints()
print(solve(N, M, readints()))

-rr = raw_input -rri = lambda: int(input()) -rrm = lambda: list(map(int, input().split())) + +readints = lambda: list(map(int, input().split())) -N, M = rrm() -print(solve(N, M, rrm())) +N, M = readints() +print(solve(N, M, readints()))