#!/usr/bin/env python3

from bisect import insort_right

n, m, *a = map(int, open(0).read().split())
a.sort()
for _ in range(m):
    insort_right(a, a.pop() >> 1)
print(sum(a)) from bisect import insort_right n, m, *a = map(int, open(0).read().split()) n map(int, open(0).read().split()) map int 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 range(m):
    insort_right(a, a.pop() >> 1) _ range(m) range m insort_right(a, a.pop() >> 1) insort_right a a.pop() >> 1 a.pop() a.pop a pop 1 print(sum(a)) print sum(a) sum a m, *a = map(int, open(0).read().split()) map(int, open(0).read().split()) m n, m, *a = map(int, open(0).read().split()) map(int, open(0).read().split()) n
#!/usr/bin/env python3

from bisect import insort_right

n, m, *a = map(int, open(0).read().split())
a.sort()
for _ in range(m):
    insort_right(a, a.pop() >> 1)
print(sum(a))
