from heapq import heappush, heappop,heapify
n,m = map(int,input().split())
def minusint(x):
  return -int(x)
a = list(map(minusint,input().split()))
heapify(a)
for _ in range(m):
  ai = heappop(a)*(-1)
  heappush(a,-(ai//2))
print(-sum(a)) from heapq import heappush, heappop,heapify n,m = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m def minusint(x):
  return -int(x) minusint return -int(x) -int(x) int(x) int x x x a = list(map(minusint,input().split())) a list(map(minusint,input().split())) list map(minusint,input().split()) map minusint input().split() ().split () input split heapify(a) heapify a for _ in range(m):
  ai = heappop(a)*(-1)
  heappush(a,-(ai//2)) _ range(m) range m ai = heappop(a)*(-1) ai heappop(a)*(-1) heappop(a) heappop a -1 heappush(a,-(ai//2)) heappush a -(ai//2) ai//2 ai 2 print(-sum(a)) print -sum(a) sum(a) sum a ai = heappop(a)*(-1) heappop(a)*(-1) ai m = map(int,input().split()) map(int,input().split()) m def minusint(x):
  return -int(x) def minusint(x):
  return -int(x) minusint a = list(map(minusint,input().split())) list(map(minusint,input().split())) a n,m = map(int,input().split()) map(int,input().split()) n
from heapq import heappush, heappop,heapify
n,m = map(int,input().split())
def minusint(x):
  return -int(x)
a = list(map(minusint,input().split()))
heapify(a)
for _ in range(m):
  ai = heappop(a)*(-1)
  heappush(a,-(ai//2))
print(-sum(a))