import sys
readline = sys.stdin.readline

N,M = map(int,readline().split())
A = list(map(lambda x:-x,map(int,readline().split())))

import heapq
heapq.heapify(A)

for i in range(M):
  val = heapq.heappop(A)
  heapq.heappush(A,((val * (-1))// 2) * (-1))

print(-sum(A)) import sys sys readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline N,M = map(int,readline().split()) N map(int,readline().split()) map int readline().split() ().split () readline split M A = list(map(lambda x:-x,map(int,readline().split()))) A list(map(lambda x:-x,map(int,readline().split()))) list map(lambda x:-x,map(int,readline().split())) map lambda x:-x -x x x map(int,readline().split()) map int readline().split() ().split () readline split import heapq heapq heapq.heapify(A) heapq.heapify heapq heapify A for i in range(M):
  val = heapq.heappop(A)
  heapq.heappush(A,((val * (-1))// 2) * (-1)) i range(M) range M val = heapq.heappop(A) val heapq.heappop(A) heapq.heappop heapq heappop A heapq.heappush(A,((val * (-1))// 2) * (-1)) heapq.heappush heapq heappush A ((val * (-1))// 2) * (-1) (val * (-1))// 2 val * (-1) val -1 2 -1 print(-sum(A)) print -sum(A) sum(A) sum A A = list(map(lambda x:-x,map(int,readline().split()))) list(map(lambda x:-x,map(int,readline().split()))) A readline = sys.stdin.readline sys.stdin.readline readline val = heapq.heappop(A) heapq.heappop(A) val M = map(int,readline().split()) map(int,readline().split()) M N,M = map(int,readline().split()) map(int,readline().split()) N
import sys
readline = sys.stdin.readline

N,M = map(int,readline().split())
A = list(map(lambda x:-x,map(int,readline().split())))

import heapq
heapq.heapify(A)

for i in range(M):
  val = heapq.heappop(A)
  heapq.heappush(A,((val * (-1))// 2) * (-1))

print(-sum(A))