from heapq import heapify, heappop, heappush
N, M = map(int, input().split())
a = [-int(a) for a in input().split()]
heapify(a)
for _ in range(M):
  heappush(a, int(heappop(a) / 2))
print(-sum(a)) from heapq import heapify, heappop, heappush N, M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M -int(a) for a in input().split() for a in input().split() a input().split() ().split () input split for a in input().split() -int(a) int(a) int a a = [-int(a) for a in input().split()] a [-int(a) for a in input().split()] heapify(a) heapify a for _ in range(M):
  heappush(a, int(heappop(a) / 2)) _ range(M) range M heappush(a, int(heappop(a) / 2)) heappush a int(heappop(a) / 2) int heappop(a) / 2 heappop(a) heappop a 2 print(-sum(a)) print -sum(a) sum(a) sum a N, M = map(int, input().split()) map(int, input().split()) N M = map(int, input().split()) map(int, input().split()) M a = [-int(a) for a in input().split()] [-int(a) for a in input().split()] a
from heapq import heapify, heappop, heappush
N, M = map(int, input().split())
a = [-int(a) for a in input().split()]
heapify(a)
for _ in range(M):
  heappush(a, int(heappop(a) / 2))
print(-sum(a))