import heapq
class HeapQ:
    def __init__(self, L, desc=False):
        if desc:
            L = [-l for l in L]
        self.sign = -1 if desc else 1
        self.HQ = L
        heapq.heapify(self.HQ)
    def pop(self):
        return heapq.heappop(self.HQ) * self.sign
    def push(self, x):
        heapq.heappush(self.HQ, x * self.sign)
    def get_list(self):
        return list([-hq for hq in self.HQ]) if self.sign == -1 else list(self.HQ)

n, m = map(int, input().split())
A = list(map(int, input().split()))
hq = HeapQ(A, desc=True)
for _ in range(m):
    hq.push(hq.pop() // 2)

print(sum(hq.get_list())) import heapq heapq class HeapQ:
    def __init__(self, L, desc=False):
        if desc:
            L = [-l for l in L]
        self.sign = -1 if desc else 1
        self.HQ = L
        heapq.heapify(self.HQ)
    def pop(self):
        return heapq.heappop(self.HQ) * self.sign
    def push(self, x):
        heapq.heappush(self.HQ, x * self.sign)
    def get_list(self):
        return list([-hq for hq in self.HQ]) if self.sign == -1 else list(self.HQ) HeapQ def __init__(self, L, desc=False):
        if desc:
            L = [-l for l in L]
        self.sign = -1 if desc else 1
        self.HQ = L
        heapq.heapify(self.HQ)
     __init__ if desc:
            L = [-l for l in L]
         desc -l for l in L for l in L l L for l in L -l l L = [-l for l in L] L [-l for l in L] self.sign = -1 if desc else 1 self.sign self sign -1 if desc else 1 desc -1 1 self.HQ = L self.HQ self HQ L heapq.heapify(self.HQ) heapq.heapify heapq heapify self.HQ self HQ self self L L desc=False desc False def pop(self):
        return heapq.heappop(self.HQ) * self.sign
     pop return heapq.heappop(self.HQ) * self.sign heapq.heappop(self.HQ) * self.sign heapq.heappop(self.HQ) heapq.heappop heapq heappop self.HQ self HQ self.sign self sign self self def push(self, x):
        heapq.heappush(self.HQ, x * self.sign)
     push heapq.heappush(self.HQ, x * self.sign) heapq.heappush heapq heappush self.HQ self HQ x * self.sign x self.sign self sign self self x x def get_list(self):
        return list([-hq for hq in self.HQ]) if self.sign == -1 else list(self.HQ) get_list -hq for hq in self.HQ for hq in self.HQ hq self.HQ self HQ for hq in self.HQ -hq hq return list([-hq for hq in self.HQ]) if self.sign == -1 else list(self.HQ) list([-hq for hq in self.HQ]) if self.sign == -1 else list(self.HQ) self.sign == -1 self.sign self sign -1 list([-hq for hq in self.HQ]) list [-hq for hq in self.HQ] list(self.HQ) list self.HQ self HQ self self n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m A = list(map(int, input().split())) A list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split hq = HeapQ(A, desc=True) hq HeapQ(A, desc=True) HeapQ A desc=True desc True for _ in range(m):
    hq.push(hq.pop() // 2) _ range(m) range m hq.push(hq.pop() // 2) hq.push hq push hq.pop() // 2 hq.pop() hq.pop hq pop 2 print(sum(hq.get_list())) print sum(hq.get_list()) sum hq.get_list() hq.get_list hq get_list m = map(int, input().split()) map(int, input().split()) m A = list(map(int, input().split())) list(map(int, input().split())) A hq = HeapQ(A, desc=True) HeapQ(A, desc=True) hq class HeapQ:
    def __init__(self, L, desc=False):
        if desc:
            L = [-l for l in L]
        self.sign = -1 if desc else 1
        self.HQ = L
        heapq.heapify(self.HQ)
    def pop(self):
        return heapq.heappop(self.HQ) * self.sign
    def push(self, x):
        heapq.heappush(self.HQ, x * self.sign)
    def get_list(self):
        return list([-hq for hq in self.HQ]) if self.sign == -1 else list(self.HQ) class HeapQ:
    def __init__(self, L, desc=False):
        if desc:
            L = [-l for l in L]
        self.sign = -1 if desc else 1
        self.HQ = L
        heapq.heapify(self.HQ)
    def pop(self):
        return heapq.heappop(self.HQ) * self.sign
    def push(self, x):
        heapq.heappush(self.HQ, x * self.sign)
    def get_list(self):
        return list([-hq for hq in self.HQ]) if self.sign == -1 else list(self.HQ) HeapQ n, m = map(int, input().split()) map(int, input().split()) n
import heapq
class HeapQ:
    def __init__(self, L, desc=False):
        if desc:
            L = [-l for l in L]
        self.sign = -1 if desc else 1
        self.HQ = L
        heapq.heapify(self.HQ)
    def pop(self):
        return heapq.heappop(self.HQ) * self.sign
    def push(self, x):
        heapq.heappush(self.HQ, x * self.sign)
    def get_list(self):
        return list([-hq for hq in self.HQ]) if self.sign == -1 else list(self.HQ)

n, m = map(int, input().split())
A = list(map(int, input().split()))
hq = HeapQ(A, desc=True)
for _ in range(m):
    hq.push(hq.pop() // 2)

print(sum(hq.get_list()))