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())
Q = []
from heapq import heappop, heappush
for a in As:
    heappush(Q, -a)
for i in range(M):
    v = heappop(Q)
    heappush(Q, v/2)
lis = [-int(x) for x in Q]
print(sum(lis)) 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 Q = [] Q [] from heapq import heappop, heappush for a in As:
    heappush(Q, -a) a As heappush(Q, -a) heappush Q -a a for i in range(M):
    v = heappop(Q)
    heappush(Q, v/2) i range(M) range M v = heappop(Q) v heappop(Q) heappop Q heappush(Q, v/2) heappush Q v/2 v 2 -int(x) for x in Q for x in Q x Q for x in Q -int(x) int(x) int x lis = [-int(x) for x in Q] lis [-int(x) for x in Q] print(sum(lis)) print sum(lis) sum lis As = list(mapint()) list(mapint()) As Q = [] [] Q def mapint(): return map(int, input().split()) def mapint(): return map(int, input().split()) mapint M = mapint() mapint() M N, M = mapint() mapint() N def input(): return sys.stdin.readline().strip() def input(): return sys.stdin.readline().strip() input v = heappop(Q) heappop(Q) v lis = [-int(x) for x in Q] [-int(x) for x in Q] lis
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())
Q = []
from heapq import heappop, heappush
for a in As:
    heappush(Q, -a)
for i in range(M):
    v = heappop(Q)
    heappush(Q, v/2)
lis = [-int(x) for x in Q]
print(sum(lis))