import heapq
class Heapq:
    def __init__(self, arr, desc=False):
        if desc:
            arr = [-a for a in arr]
        self.sign = -1 if desc else 1
        self.hq = arr
        heapq.heapify(self.hq)
 
    def pop(self):
        return heapq.heappop(self.hq) * self.sign
 
    def push(self, a):
        heapq.heappush(self.hq, a * self.sign)
 
    def top(self):
        return self.hq[0] * self.sign
        
N,M=map(int,input().split())
A=list(map(int,input().split()))

q = Heapq(A, True)
    
for i in range(M):
    x=q.pop()
    q.push(x//2)

print(sum([q.pop() for _ in range(N)])) import heapq heapq class Heapq:
    def __init__(self, arr, desc=False):
        if desc:
            arr = [-a for a in arr]
        self.sign = -1 if desc else 1
        self.hq = arr
        heapq.heapify(self.hq)
 
    def pop(self):
        return heapq.heappop(self.hq) * self.sign
 
    def push(self, a):
        heapq.heappush(self.hq, a * self.sign)
 
    def top(self):
        return self.hq[0] * self.sign
         Heapq def __init__(self, arr, desc=False):
        if desc:
            arr = [-a for a in arr]
        self.sign = -1 if desc else 1
        self.hq = arr
        heapq.heapify(self.hq)
 
     __init__ if desc:
            arr = [-a for a in arr]
         desc -a for a in arr for a in arr a arr for a in arr -a a arr = [-a for a in arr] arr [-a for a in arr] self.sign = -1 if desc else 1 self.sign self sign -1 if desc else 1 desc -1 1 self.hq = arr self.hq self hq arr heapq.heapify(self.hq) heapq.heapify heapq heapify self.hq self hq self self arr arr 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, a):
        heapq.heappush(self.hq, a * self.sign)
 
     push heapq.heappush(self.hq, a * self.sign) heapq.heappush heapq heappush self.hq self hq a * self.sign a self.sign self sign self self a a def top(self):
        return self.hq[0] * self.sign
         top return self.hq[0] * self.sign self.hq[0] * self.sign self.hq[0] self.hq self hq 0 self.sign self sign 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 q = Heapq(A, True) q Heapq(A, True) Heapq A True for i in range(M):
    x=q.pop()
    q.push(x//2) i range(M) range M x=q.pop() x q.pop() q.pop q pop q.push(x//2) q.push q push x//2 x 2 q.pop() for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) q.pop() q.pop q pop print(sum([q.pop() for _ in range(N)])) print sum([q.pop() for _ in range(N)]) sum [q.pop() for _ in range(N)] A=list(map(int,input().split())) list(map(int,input().split())) A class Heapq:
    def __init__(self, arr, desc=False):
        if desc:
            arr = [-a for a in arr]
        self.sign = -1 if desc else 1
        self.hq = arr
        heapq.heapify(self.hq)
 
    def pop(self):
        return heapq.heappop(self.hq) * self.sign
 
    def push(self, a):
        heapq.heappush(self.hq, a * self.sign)
 
    def top(self):
        return self.hq[0] * self.sign
         class Heapq:
    def __init__(self, arr, desc=False):
        if desc:
            arr = [-a for a in arr]
        self.sign = -1 if desc else 1
        self.hq = arr
        heapq.heapify(self.hq)
 
    def pop(self):
        return heapq.heappop(self.hq) * self.sign
 
    def push(self, a):
        heapq.heappush(self.hq, a * self.sign)
 
    def top(self):
        return self.hq[0] * self.sign
         Heapq x=q.pop() q.pop() x M=map(int,input().split()) map(int,input().split()) M q = Heapq(A, True) Heapq(A, True) q N,M=map(int,input().split()) map(int,input().split()) N
import heapq
class Heapq:
    def __init__(self, arr, desc=False):
        if desc:
            arr = [-a for a in arr]
        self.sign = -1 if desc else 1
        self.hq = arr
        heapq.heapify(self.hq)
 
    def pop(self):
        return heapq.heappop(self.hq) * self.sign
 
    def push(self, a):
        heapq.heappush(self.hq, a * self.sign)
 
    def top(self):
        return self.hq[0] * self.sign
        
N,M=map(int,input().split())
A=list(map(int,input().split()))

q = Heapq(A, True)
    
for i in range(M):
    x=q.pop()
    q.push(x//2)

print(sum([q.pop() for _ in range(N)]))
