from heapq import heappush as hpush
from heapq import heappop as hpop

class Descending_HeapQueue:
    def __init__(self, hq=[]):
        self.hq = []
        for i in hq:
            self.push(i)
    def push(self, n):
        hpush(self.hq, -n)
    def pop(self):
        return -hpop(self.hq)
    def sum(self):
        return -sum(self.hq)
    def __str__(self):
        return [-i for i in self.hq].__str__()

def main():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    dhq = Descending_HeapQueue(A)
    for _ in range(M):
        dhq.push(dhq.pop() // 2)
    print(dhq.sum())
main() from heapq import heappush as hpush from heapq import heappop as hpop class Descending_HeapQueue:
    def __init__(self, hq=[]):
        self.hq = []
        for i in hq:
            self.push(i)
    def push(self, n):
        hpush(self.hq, -n)
    def pop(self):
        return -hpop(self.hq)
    def sum(self):
        return -sum(self.hq)
    def __str__(self):
        return [-i for i in self.hq].__str__() Descending_HeapQueue def __init__(self, hq=[]):
        self.hq = []
        for i in hq:
            self.push(i)
     __init__ self.hq = [] self.hq self hq [] for i in hq:
            self.push(i)
     i hq self.push(i) self.push self push i self self hq=[] hq [] def push(self, n):
        hpush(self.hq, -n)
     push hpush(self.hq, -n) hpush self.hq self hq -n n self self n n def pop(self):
        return -hpop(self.hq)
     pop return -hpop(self.hq) -hpop(self.hq) hpop(self.hq) hpop self.hq self hq self self def sum(self):
        return -sum(self.hq)
     sum return -sum(self.hq) -sum(self.hq) sum(self.hq) sum self.hq self hq self self def __str__(self):
        return [-i for i in self.hq].__str__() __str__ -i for i in self.hq for i in self.hq i self.hq self hq for i in self.hq -i i return [-i for i in self.hq].__str__() [-i for i in self.hq].__str__() [-i for i in self.hq].__str__ [-i for i in self.hq] __str__ self self def main():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    dhq = Descending_HeapQueue(A)
    for _ in range(M):
        dhq.push(dhq.pop() // 2)
    print(dhq.sum()) main 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 dhq = Descending_HeapQueue(A) dhq Descending_HeapQueue(A) Descending_HeapQueue A for _ in range(M):
        dhq.push(dhq.pop() // 2)
     _ range(M) range M dhq.push(dhq.pop() // 2) dhq.push dhq push dhq.pop() // 2 dhq.pop() dhq.pop dhq pop 2 print(dhq.sum()) print dhq.sum() dhq.sum dhq sum main() main def main():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    dhq = Descending_HeapQueue(A)
    for _ in range(M):
        dhq.push(dhq.pop() // 2)
    print(dhq.sum()) def main():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    dhq = Descending_HeapQueue(A)
    for _ in range(M):
        dhq.push(dhq.pop() // 2)
    print(dhq.sum()) main class Descending_HeapQueue:
    def __init__(self, hq=[]):
        self.hq = []
        for i in hq:
            self.push(i)
    def push(self, n):
        hpush(self.hq, -n)
    def pop(self):
        return -hpop(self.hq)
    def sum(self):
        return -sum(self.hq)
    def __str__(self):
        return [-i for i in self.hq].__str__() class Descending_HeapQueue:
    def __init__(self, hq=[]):
        self.hq = []
        for i in hq:
            self.push(i)
    def push(self, n):
        hpush(self.hq, -n)
    def pop(self):
        return -hpop(self.hq)
    def sum(self):
        return -sum(self.hq)
    def __str__(self):
        return [-i for i in self.hq].__str__() Descending_HeapQueue
from heapq import heappush as hpush
from heapq import heappop as hpop

class Descending_HeapQueue:
    def __init__(self, hq=[]):
        self.hq = []
        for i in hq:
            self.push(i)
    def push(self, n):
        hpush(self.hq, -n)
    def pop(self):
        return -hpop(self.hq)
    def sum(self):
        return -sum(self.hq)
    def __str__(self):
        return [-i for i in self.hq].__str__()

def main():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    dhq = Descending_HeapQueue(A)
    for _ in range(M):
        dhq.push(dhq.pop() // 2)
    print(dhq.sum())
main()