import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, M = mapint()
As = list(mapint())
from heapq import heappush, heappop
Q = []

for a in As:
    heappush(Q, -a)

for i in range(M):
    a = -heappop(Q)
    heappush(Q, -(a//2))

print(-sum(Q)) import sys sys def input(): return sys.stdin.readline().strip() input def mapint(): return map(int, input().split()) mapint sys.setrecursionlimit(10**9) sys.setrecursionlimit sys setrecursionlimit 10**9 10 9 N, M = mapint() N mapint() mapint M As = list(mapint()) As list(mapint()) list mapint() mapint from heapq import heappush, heappop Q = [] Q [] for a in As:
    heappush(Q, -a) a As heappush(Q, -a) heappush Q -a a for i in range(M):
    a = -heappop(Q)
    heappush(Q, -(a//2)) i range(M) range M a = -heappop(Q) a -heappop(Q) heappop(Q) heappop Q heappush(Q, -(a//2)) heappush Q -(a//2) a//2 a 2 print(-sum(Q)) print -sum(Q) sum(Q) sum Q def input(): return sys.stdin.readline().strip() def input(): return sys.stdin.readline().strip() input def mapint(): return map(int, input().split()) def mapint(): return map(int, input().split()) mapint As = list(mapint()) list(mapint()) As M = mapint() mapint() M Q = [] [] Q N, M = mapint() mapint() N a = -heappop(Q) -heappop(Q) a
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, M = mapint()
As = list(mapint())
from heapq import heappush, heappop
Q = []

for a in As:
    heappush(Q, -a)

for i in range(M):
    a = -heappop(Q)
    heappush(Q, -(a//2))

print(-sum(Q))