import sys
stdin = sys.stdin

n,m = map(int, stdin.readline().split())
an = [i*(-1) for i in map(int, stdin.readline().split())]
#print(an)
#print(sum(an))

import heapq
heapq.heapify(an)

for _ in range(m):
    b = heapq.heappop(an)
    heapq.heappush(an, (-1)*((-1)*b//2))

#print(an)
ans = (-1)*sum(an)
print(ans) import sys sys stdin = sys.stdin stdin sys.stdin sys stdin n,m = map(int, stdin.readline().split()) n map(int, stdin.readline().split()) map int stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split m i*(-1) for i in map(int, stdin.readline().split()) for i in map(int, stdin.readline().split()) i map(int, stdin.readline().split()) map int stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split for i in map(int, stdin.readline().split()) i*(-1) i -1 an = [i*(-1) for i in map(int, stdin.readline().split())] an [i*(-1) for i in map(int, stdin.readline().split())] import heapq heapq heapq.heapify(an) heapq.heapify heapq heapify an for _ in range(m):
    b = heapq.heappop(an)
    heapq.heappush(an, (-1)*((-1)*b//2))

#print(an) _ range(m) range m b = heapq.heappop(an) b heapq.heappop(an) heapq.heappop heapq heappop an heapq.heappush(an, (-1)*((-1)*b//2)) heapq.heappush heapq heappush an (-1)*((-1)*b//2) -1 (-1)*b//2 (-1)*b -1 b 2 ans = (-1)*sum(an) ans (-1)*sum(an) -1 sum(an) sum an print(ans) print ans ans = (-1)*sum(an) (-1)*sum(an) ans an = [i*(-1) for i in map(int, stdin.readline().split())] [i*(-1) for i in map(int, stdin.readline().split())] an n,m = map(int, stdin.readline().split()) map(int, stdin.readline().split()) n stdin = sys.stdin sys.stdin stdin m = map(int, stdin.readline().split()) map(int, stdin.readline().split()) m b = heapq.heappop(an) heapq.heappop(an) b
import sys
stdin = sys.stdin

n,m = map(int, stdin.readline().split())
an = [i*(-1) for i in map(int, stdin.readline().split())]
#print(an)
#print(sum(an))

import heapq
heapq.heapify(an)

for _ in range(m):
    b = heapq.heappop(an)
    heapq.heappush(an, (-1)*((-1)*b//2))

#print(an)
ans = (-1)*sum(an)
print(ans)