import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


n,m = list(map(int, input().split()))
a = list(map(int, input().split()))
from heapq import heappop as hpp, heappush as hp
h = []
for num in a:
    hp(h, -num)
for _ in range(m):
    val = hpp(h)
    val *= -1
    hp(h, -(val//2))
ans = -sum(h)
print(ans) import sys sys input = lambda : sys.stdin.readline().rstrip() input lambda : sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip sys.setrecursionlimit(max(1000, 10**9)) sys.setrecursionlimit sys setrecursionlimit max(1000, 10**9) max 1000 10**9 10 9 write = lambda x: sys.stdout.write(x+"\n") write lambda x: sys.stdout.write(x+"\n") sys.stdout.write(x+"\n") sys.stdout.write sys.stdout sys stdout write x+"\n" x "\n" x n,m = list(map(int, input().split())) n list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split m a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split from heapq import heappop as hpp, heappush as hp h = [] h [] for num in a:
    hp(h, -num) num a hp(h, -num) hp h -num num for _ in range(m):
    val = hpp(h)
    val *= -1
    hp(h, -(val//2)) _ range(m) range m val = hpp(h) val hpp(h) hpp h val *= -1 val -1 hp(h, -(val//2)) hp h -(val//2) val//2 val 2 ans = -sum(h) ans -sum(h) sum(h) sum h print(ans) print ans n,m = list(map(int, input().split())) list(map(int, input().split())) n input = lambda : sys.stdin.readline().rstrip() lambda : sys.stdin.readline().rstrip() input write = lambda x: sys.stdout.write(x+"\n") lambda x: sys.stdout.write(x+"\n") write val *= -1 -1 val h = [] [] h val = hpp(h) hpp(h) val ans = -sum(h) -sum(h) ans m = list(map(int, input().split())) list(map(int, input().split())) m a = list(map(int, input().split())) list(map(int, input().split())) a
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


n,m = list(map(int, input().split()))
a = list(map(int, input().split()))
from heapq import heappop as hpp, heappush as hp
h = []
for num in a:
    hp(h, -num)
for _ in range(m):
    val = hpp(h)
    val *= -1
    hp(h, -(val//2))
ans = -sum(h)
print(ans)