import sys
import math
import itertools
import collections
from collections import deque
import heapq 

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline().strip()

NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()

def main():

    N, M = NMI()
    A = NLI()
    
    A = list(map(lambda x: x*(-1), A))
    
    heapq.heapify(A)
    
    for m in range(M):
        highest = (heapq.heappop(A)*(-1))
        discounted = math.floor(highest/2) * -1
        heapq.heappush(A, discounted)

        
    print(sum(A)*-1)
#

if __name__ == '__main__':
    main() import sys sys import math math import itertools itertools import collections collections from collections import deque import heapq heapq sys.setrecursionlimit(1000000) sys.setrecursionlimit sys setrecursionlimit 1000000 MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 input = lambda: sys.stdin.readline().strip() input lambda: sys.stdin.readline().strip() sys.stdin.readline().strip() sys.stdin.readline().strip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline strip NI = lambda: int(input()) NI lambda: int(input()) int(input()) int input() input NMI = lambda: map(int, input().split()) NMI lambda: map(int, input().split()) map(int, input().split()) map int input().split() ().split () input split NLI = lambda: list(NMI()) NLI lambda: list(NMI()) list(NMI()) list NMI() NMI SI = lambda: input() SI lambda: input() input() input def main():

    N, M = NMI()
    A = NLI()
    
    A = list(map(lambda x: x*(-1), A))
    
    heapq.heapify(A)
    
    for m in range(M):
        highest = (heapq.heappop(A)*(-1))
        discounted = math.floor(highest/2) * -1
        heapq.heappush(A, discounted)

        
    print(sum(A)*-1)
# main N, M = NMI() N NMI() NMI M A = NLI() A NLI() NLI A = list(map(lambda x: x*(-1), A)) A list(map(lambda x: x*(-1), A)) list map(lambda x: x*(-1), A) map lambda x: x*(-1) x*(-1) x -1 x A heapq.heapify(A) heapq.heapify heapq heapify A for m in range(M):
        highest = (heapq.heappop(A)*(-1))
        discounted = math.floor(highest/2) * -1
        heapq.heappush(A, discounted)

        
     m range(M) range M highest = (heapq.heappop(A)*(-1)) highest heapq.heappop(A)*(-1) heapq.heappop(A) heapq.heappop heapq heappop A -1 discounted = math.floor(highest/2) * -1 discounted math.floor(highest/2) * -1 math.floor(highest/2) math.floor math floor highest/2 highest 2 -1 heapq.heappush(A, discounted) heapq.heappush heapq heappush A discounted print(sum(A)*-1) print sum(A)*-1 sum(A) sum A -1 if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main NMI = lambda: map(int, input().split()) lambda: map(int, input().split()) NMI MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD def main():

    N, M = NMI()
    A = NLI()
    
    A = list(map(lambda x: x*(-1), A))
    
    heapq.heapify(A)
    
    for m in range(M):
        highest = (heapq.heappop(A)*(-1))
        discounted = math.floor(highest/2) * -1
        heapq.heappush(A, discounted)

        
    print(sum(A)*-1)
# def main():

    N, M = NMI()
    A = NLI()
    
    A = list(map(lambda x: x*(-1), A))
    
    heapq.heapify(A)
    
    for m in range(M):
        highest = (heapq.heappop(A)*(-1))
        discounted = math.floor(highest/2) * -1
        heapq.heappush(A, discounted)

        
    print(sum(A)*-1)
# main input = lambda: sys.stdin.readline().strip() lambda: sys.stdin.readline().strip() input NLI = lambda: list(NMI()) lambda: list(NMI()) NLI NI = lambda: int(input()) lambda: int(input()) NI SI = lambda: input() lambda: input() SI
import sys
import math
import itertools
import collections
from collections import deque
import heapq 

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline().strip()

NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()

def main():

    N, M = NMI()
    A = NLI()
    
    A = list(map(lambda x: x*(-1), A))
    
    heapq.heapify(A)
    
    for m in range(M):
        highest = (heapq.heappop(A)*(-1))
        discounted = math.floor(highest/2) * -1
        heapq.heappush(A, discounted)

        
    print(sum(A)*-1)
#

if __name__ == '__main__':
    main()