import sys
from heapq import heappush, heappop

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, M, *A = map(int, read().split())

    hq = []
    for a in A:
        heappush(hq, -a)

    for _ in range(M):
        a = heappop(hq)
        a = int(a / 2)
        heappush(hq, a)

    print(-sum(hq))
    return


if __name__ == '__main__':
    main() import sys sys from heapq import heappush, heappop read = sys.stdin.read read sys.stdin.read sys.stdin sys stdin read readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline readlines = sys.stdin.readlines readlines sys.stdin.readlines sys.stdin sys stdin readlines sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 INF = 1 << 60 INF 1 << 60 1 60 MOD = 1000000007 MOD 1000000007 def main():
    N, M, *A = map(int, read().split())

    hq = []
    for a in A:
        heappush(hq, -a)

    for _ in range(M):
        a = heappop(hq)
        a = int(a / 2)
        heappush(hq, a)

    print(-sum(hq))
    return main N, M, *A = map(int, read().split()) N map(int, read().split()) map int read().split() ().split () read split M *A A hq = [] hq [] for a in A:
        heappush(hq, -a)

     a A heappush(hq, -a) heappush hq -a a for _ in range(M):
        a = heappop(hq)
        a = int(a / 2)
        heappush(hq, a)

     _ range(M) range M a = heappop(hq) a heappop(hq) heappop hq a = int(a / 2) a int(a / 2) int a / 2 a 2 heappush(hq, a) heappush hq a print(-sum(hq)) print -sum(hq) sum(hq) sum hq return if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main readline = sys.stdin.readline sys.stdin.readline readline readlines = sys.stdin.readlines sys.stdin.readlines readlines MOD = 1000000007 1000000007 MOD def main():
    N, M, *A = map(int, read().split())

    hq = []
    for a in A:
        heappush(hq, -a)

    for _ in range(M):
        a = heappop(hq)
        a = int(a / 2)
        heappush(hq, a)

    print(-sum(hq))
    return def main():
    N, M, *A = map(int, read().split())

    hq = []
    for a in A:
        heappush(hq, -a)

    for _ in range(M):
        a = heappop(hq)
        a = int(a / 2)
        heappush(hq, a)

    print(-sum(hq))
    return main INF = 1 << 60 1 << 60 INF read = sys.stdin.read sys.stdin.read read
import sys
from heapq import heappush, heappop

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, M, *A = map(int, read().split())

    hq = []
    for a in A:
        heappush(hq, -a)

    for _ in range(M):
        a = heappop(hq)
        a = int(a / 2)
        heappush(hq, a)

    print(-sum(hq))
    return


if __name__ == '__main__':
    main()
