from heapq import*
n, m, *a = eval(",-".join(open(0).read().split()))
a.sort()
for _ in [0]*-m:heappush(a, 0--heappop(a)//2)
print(-sum(a)) from heapq import* n, m, *a = eval(",-".join(open(0).read().split())) n eval(",-".join(open(0).read().split())) eval ",-".join(open(0).read().split()) ",-".join ",-" join open(0).read().split() (0).read().split (0).read() (0).read (0) open 0 read split m *a a a.sort() a.sort a sort for _ in [0]*-m:heappush(a, 0--heappop(a)//2) _ [0]*-m [0] 0 -m m print(-sum(a)) print -sum(a) sum(a) sum a m, *a = eval(",-".join(open(0).read().split())) eval(",-".join(open(0).read().split())) m n, m, *a = eval(",-".join(open(0).read().split())) eval(",-".join(open(0).read().split())) n
from heapq import*
n, m, *a = eval(",-".join(open(0).read().split()))
a.sort()
for _ in [0]*-m:heappush(a, 0--heappop(a)//2)
print(-sum(a))