# -*- coding: utf-8 -*-
"""
Created on Wed Sep 16 12:35:58 2020

@author: liang
"""

N, M = map(int, input().split())
A = [int(x) for x in input().split()]
A.sort(reverse=True)
#print(A)
count = 0
while count != M:
    A[0] //= 2
    count += 1
    tmp = A[0]
    for i in range(1,N):
        if count == M:
            break
        if A[i] > tmp:
            A[i] //= 2
            count += 1
        ##   break
    A.sort(reverse=True)
ans = sum(A)
#print(A)
print(ans) """
Created on Wed Sep 16 12:35:58 2020

@author: liang
""" N, M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x A = [int(x) for x in input().split()] A [int(x) for x in input().split()] A.sort(reverse=True) A.sort A sort reverse=True reverse True count = 0 count 0 while count != M:
    A[0] //= 2
    count += 1
    tmp = A[0]
    for i in range(1,N):
        if count == M:
            break
        if A[i] > tmp:
            A[i] //= 2
            count += 1
        ##   break
    A.sort(reverse=True) count != M count M A[0] //= 2 A[0] A 0 2 count += 1 count 1 tmp = A[0] tmp A[0] A 0 for i in range(1,N):
        if count == M:
            break
        if A[i] > tmp:
            A[i] //= 2
            count += 1
        ##   break
     i range(1,N) range 1 N if count == M:
            break
         count == M count M break if A[i] > tmp:
            A[i] //= 2
            count += 1
        ##   break
     A[i] > tmp A[i] A i tmp A[i] //= 2 A[i] A i 2 count += 1 count 1 A.sort(reverse=True) A.sort A sort reverse=True reverse True ans = sum(A) ans sum(A) sum A print(ans) print ans N, M = map(int, input().split()) map(int, input().split()) N count += 1 1 count count = 0 0 count ans = sum(A) sum(A) ans A = [int(x) for x in input().split()] [int(x) for x in input().split()] A count += 1 1 count M = map(int, input().split()) map(int, input().split()) M tmp = A[0] A[0] tmp
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 16 12:35:58 2020

@author: liang
"""

N, M = map(int, input().split())
A = [int(x) for x in input().split()]
A.sort(reverse=True)
#print(A)
count = 0
while count != M:
    A[0] //= 2
    count += 1
    tmp = A[0]
    for i in range(1,N):
        if count == M:
            break
        if A[i] > tmp:
            A[i] //= 2
            count += 1
        ##   break
    A.sort(reverse=True)
ans = sum(A)
#print(A)
print(ans)