import heapq as hp

n,m=[int(x) for x in input().rstrip().split()]
a=[-int(x) for x in input().rstrip().split()]

hp.heapify(a)

for i in range(m):
  now=hp.heappop(a)
  hp.heappush(a,-(-now//2))
print(-sum(a))
 import heapq as hp heapq int(x) for x in input().rstrip().split() for x in input().rstrip().split() x input().rstrip().split() ().rstrip().split ().rstrip() ().rstrip () input rstrip split for x in input().rstrip().split() int(x) int x n,m=[int(x) for x in input().rstrip().split()] n [int(x) for x in input().rstrip().split()] m -int(x) for x in input().rstrip().split() for x in input().rstrip().split() x input().rstrip().split() ().rstrip().split ().rstrip() ().rstrip () input rstrip split for x in input().rstrip().split() -int(x) int(x) int x a=[-int(x) for x in input().rstrip().split()] a [-int(x) for x in input().rstrip().split()] hp.heapify(a) hp.heapify hp heapify a for i in range(m):
  now=hp.heappop(a)
  hp.heappush(a,-(-now//2)) i range(m) range m now=hp.heappop(a) now hp.heappop(a) hp.heappop hp heappop a hp.heappush(a,-(-now//2)) hp.heappush hp heappush a -(-now//2) -now//2 -now now 2 print(-sum(a)) print -sum(a) sum(a) sum a now=hp.heappop(a) hp.heappop(a) now n,m=[int(x) for x in input().rstrip().split()] [int(x) for x in input().rstrip().split()] n m=[int(x) for x in input().rstrip().split()] [int(x) for x in input().rstrip().split()] m a=[-int(x) for x in input().rstrip().split()] [-int(x) for x in input().rstrip().split()] a
import heapq as hp

n,m=[int(x) for x in input().rstrip().split()]
a=[-int(x) for x in input().rstrip().split()]

hp.heapify(a)

for i in range(m):
  now=hp.heappop(a)
  hp.heappush(a,-(-now//2))
print(-sum(a))

