import sys
from collections import deque
import itertools
from collections import deque
sys.setrecursionlimit(10 ** 9)
import heapq
import numpy as np

# map(int, sys.stdin.read().split())


def input():
    return sys.stdin.readline().rstrip()


def main():
    N,M = map(int,input().split())
    A = list(map(lambda x: int(x)*-1,sys.stdin.read().split()))
    heapq.heapify(A)

    for _ in range(M):
        temp = heapq.heappop(A)
        temp=-temp//2
        heapq.heappush(A,-temp)
    print(-sum(A))




    pass



if __name__ == "__main__":
    main() import sys sys from collections import deque import itertools itertools from collections import deque sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 import heapq heapq import numpy as np numpy def input():
    return sys.stdin.readline().rstrip() input return sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip def main():
    N,M = map(int,input().split())
    A = list(map(lambda x: int(x)*-1,sys.stdin.read().split()))
    heapq.heapify(A)

    for _ in range(M):
        temp = heapq.heappop(A)
        temp=-temp//2
        heapq.heappush(A,-temp)
    print(-sum(A))




    pass main 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,sys.stdin.read().split())) A list(map(lambda x: int(x)*-1,sys.stdin.read().split())) list map(lambda x: int(x)*-1,sys.stdin.read().split()) map lambda x: int(x)*-1 int(x)*-1 int(x) int x -1 x sys.stdin.read().split() sys.stdin.read().split sys.stdin.read() sys.stdin.read sys.stdin sys stdin read split heapq.heapify(A) heapq.heapify heapq heapify A for _ in range(M):
        temp = heapq.heappop(A)
        temp=-temp//2
        heapq.heappush(A,-temp)
     _ range(M) range M temp = heapq.heappop(A) temp heapq.heappop(A) heapq.heappop heapq heappop A temp=-temp//2 temp -temp//2 -temp temp 2 heapq.heappush(A,-temp) heapq.heappush heapq heappush A -temp temp print(-sum(A)) print -sum(A) sum(A) sum A if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    N,M = map(int,input().split())
    A = list(map(lambda x: int(x)*-1,sys.stdin.read().split()))
    heapq.heapify(A)

    for _ in range(M):
        temp = heapq.heappop(A)
        temp=-temp//2
        heapq.heappush(A,-temp)
    print(-sum(A))




    pass def main():
    N,M = map(int,input().split())
    A = list(map(lambda x: int(x)*-1,sys.stdin.read().split()))
    heapq.heapify(A)

    for _ in range(M):
        temp = heapq.heappop(A)
        temp=-temp//2
        heapq.heappush(A,-temp)
    print(-sum(A))




    pass main def input():
    return sys.stdin.readline().rstrip() def input():
    return sys.stdin.readline().rstrip() input
import sys
from collections import deque
import itertools
from collections import deque
sys.setrecursionlimit(10 ** 9)
import heapq
import numpy as np

# map(int, sys.stdin.read().split())


def input():
    return sys.stdin.readline().rstrip()


def main():
    N,M = map(int,input().split())
    A = list(map(lambda x: int(x)*-1,sys.stdin.read().split()))
    heapq.heapify(A)

    for _ in range(M):
        temp = heapq.heappop(A)
        temp=-temp//2
        heapq.heappush(A,-temp)
    print(-sum(A))




    pass



if __name__ == "__main__":
    main()
