import queue

n, m = [int(_) for _ in input().split(' ')]
a = [int(_) for _ in input().split(' ')]

q = queue.PriorityQueue()
for i in a:
    q.put(-i)

for _ in range(m):
    i = -(q.get())
    q.put(-(i >> 1))

answer = 0
for _ in range(n):
    answer -= q.get()

print(answer) import queue queue int(_) for _ in input().split(' ') for _ in input().split(' ') _ input().split(' ') ().split () input split ' ' for _ in input().split(' ') int(_) int _ n, m = [int(_) for _ in input().split(' ')] n [int(_) for _ in input().split(' ')] m int(_) for _ in input().split(' ') for _ in input().split(' ') _ input().split(' ') ().split () input split ' ' for _ in input().split(' ') int(_) int _ a = [int(_) for _ in input().split(' ')] a [int(_) for _ in input().split(' ')] q = queue.PriorityQueue() q queue.PriorityQueue() queue.PriorityQueue queue PriorityQueue for i in a:
    q.put(-i) i a q.put(-i) q.put q put -i i for _ in range(m):
    i = -(q.get())
    q.put(-(i >> 1)) _ range(m) range m i = -(q.get()) i -(q.get()) q.get() q.get q get q.put(-(i >> 1)) q.put q put -(i >> 1) i >> 1 i 1 answer = 0 answer 0 for _ in range(n):
    answer -= q.get() _ range(n) range n answer -= q.get() answer q.get() q.get q get print(answer) print answer a = [int(_) for _ in input().split(' ')] [int(_) for _ in input().split(' ')] a answer -= q.get() q.get() answer m = [int(_) for _ in input().split(' ')] [int(_) for _ in input().split(' ')] m answer = 0 0 answer n, m = [int(_) for _ in input().split(' ')] [int(_) for _ in input().split(' ')] n i = -(q.get()) -(q.get()) i q = queue.PriorityQueue() queue.PriorityQueue() q
import queue

n, m = [int(_) for _ in input().split(' ')]
a = [int(_) for _ in input().split(' ')]

q = queue.PriorityQueue()
for i in a:
    q.put(-i)

for _ in range(m):
    i = -(q.get())
    q.put(-(i >> 1))

answer = 0
for _ in range(n):
    answer -= q.get()

print(answer)
