import heapq

n, m = map(int,input().split())
a = [-1 * int(i) for i in input().split()]

ans = 0

heapq.heapify(a)

for i in range(m):
    hangaku = (heapq.heappop(a) * -1) // 2 * -1
    heapq.heappush(a, hangaku)    

print(-1*sum(a)) import heapq heapq n, m = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m -1 * int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() -1 * int(i) -1 int(i) int i a = [-1 * int(i) for i in input().split()] a [-1 * int(i) for i in input().split()] ans = 0 ans 0 heapq.heapify(a) heapq.heapify heapq heapify a for i in range(m):
    hangaku = (heapq.heappop(a) * -1) // 2 * -1
    heapq.heappush(a, hangaku)     i range(m) range m hangaku = (heapq.heappop(a) * -1) // 2 * -1 hangaku (heapq.heappop(a) * -1) // 2 * -1 (heapq.heappop(a) * -1) // 2 heapq.heappop(a) * -1 heapq.heappop(a) heapq.heappop heapq heappop a -1 2 -1 heapq.heappush(a, hangaku) heapq.heappush heapq heappush a hangaku print(-1*sum(a)) print -1*sum(a) -1 sum(a) sum a m = map(int,input().split()) map(int,input().split()) m hangaku = (heapq.heappop(a) * -1) // 2 * -1 (heapq.heappop(a) * -1) // 2 * -1 hangaku a = [-1 * int(i) for i in input().split()] [-1 * int(i) for i in input().split()] a n, m = map(int,input().split()) map(int,input().split()) n ans = 0 0 ans
import heapq

n, m = map(int,input().split())
a = [-1 * int(i) for i in input().split()]

ans = 0

heapq.heapify(a)

for i in range(m):
    hangaku = (heapq.heappop(a) * -1) // 2 * -1
    heapq.heappush(a, hangaku)    

print(-1*sum(a))