import sys
from heapq import heapify, heappop, heappush

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n, m = map(int, input().split())
    A = list(map(lambda x: int(x) * (-1), input().split()))
    heapify(A)
    for _ in range(m):
        a = (heappop(A) * (-1)) // 2
        heappush(A, a * (-1))

    print(sum(A) * (-1))


if __name__ == '__main__':
    resolve() import sys sys from heapq import heapify, heappop, heappush sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline f_inf = float('inf') f_inf float('inf') float 'inf' mod = 10 ** 9 + 7 mod 10 ** 9 + 7 10 ** 9 10 9 7 def resolve():
    n, m = map(int, input().split())
    A = list(map(lambda x: int(x) * (-1), input().split()))
    heapify(A)
    for _ in range(m):
        a = (heappop(A) * (-1)) // 2
        heappush(A, a * (-1))

    print(sum(A) * (-1)) resolve n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m A = list(map(lambda x: int(x) * (-1), input().split())) A list(map(lambda x: int(x) * (-1), input().split())) list map(lambda x: int(x) * (-1), input().split()) map lambda x: int(x) * (-1) int(x) * (-1) int(x) int x -1 x input().split() ().split () input split heapify(A) heapify A for _ in range(m):
        a = (heappop(A) * (-1)) // 2
        heappush(A, a * (-1))

     _ range(m) range m a = (heappop(A) * (-1)) // 2 a (heappop(A) * (-1)) // 2 heappop(A) * (-1) heappop(A) heappop A -1 2 heappush(A, a * (-1)) heappush A a * (-1) a -1 print(sum(A) * (-1)) print sum(A) * (-1) sum(A) sum A -1 if __name__ == '__main__':
    resolve() __name__ == '__main__' __name__ '__main__' resolve() resolve input = sys.stdin.readline sys.stdin.readline input mod = 10 ** 9 + 7 10 ** 9 + 7 mod def resolve():
    n, m = map(int, input().split())
    A = list(map(lambda x: int(x) * (-1), input().split()))
    heapify(A)
    for _ in range(m):
        a = (heappop(A) * (-1)) // 2
        heappush(A, a * (-1))

    print(sum(A) * (-1)) def resolve():
    n, m = map(int, input().split())
    A = list(map(lambda x: int(x) * (-1), input().split()))
    heapify(A)
    for _ in range(m):
        a = (heappop(A) * (-1)) // 2
        heappush(A, a * (-1))

    print(sum(A) * (-1)) resolve f_inf = float('inf') float('inf') f_inf
import sys
from heapq import heapify, heappop, heappush

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n, m = map(int, input().split())
    A = list(map(lambda x: int(x) * (-1), input().split()))
    heapify(A)
    for _ in range(m):
        a = (heappop(A) * (-1)) // 2
        heappush(A, a * (-1))

    print(sum(A) * (-1))


if __name__ == '__main__':
    resolve()
