#!/usr/bin/env python3

import sys
from heapq import heapify, heappop, heappush
from math import ceil
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N, M = map(int, input().split())
A = list(map(int, input().split()))
A = [-a for a in A]

heapify(A)

for i in range(M):
    min_A = heappop(A)
    heappush(A, ceil(min_A/2))

print(-sum(A))
 import sys sys from heapq import heapify, heappop, heappush from math import ceil read = sys.stdin.buffer.read read sys.stdin.buffer.read sys.stdin.buffer sys.stdin sys stdin buffer read readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline readlines = sys.stdin.buffer.readlines readlines sys.stdin.buffer.readlines sys.stdin.buffer sys.stdin sys stdin buffer readlines sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 N, M = map(int, input().split()) N 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 -a for a in A for a in A a A for a in A -a a A = [-a for a in A] A [-a for a in A] heapify(A) heapify A for i in range(M):
    min_A = heappop(A)
    heappush(A, ceil(min_A/2)) i range(M) range M min_A = heappop(A) min_A heappop(A) heappop A heappush(A, ceil(min_A/2)) heappush A ceil(min_A/2) ceil min_A/2 min_A 2 print(-sum(A)) print -sum(A) sum(A) sum A readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline min_A = heappop(A) heappop(A) min_A readlines = sys.stdin.buffer.readlines sys.stdin.buffer.readlines readlines A = [-a for a in A] [-a for a in A] A read = sys.stdin.buffer.read sys.stdin.buffer.read read N, M = map(int, input().split()) map(int, input().split()) N M = map(int, input().split()) map(int, input().split()) M A = list(map(int, input().split())) list(map(int, input().split())) A
#!/usr/bin/env python3

import sys
from heapq import heapify, heappop, heappush
from math import ceil
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N, M = map(int, input().split())
A = list(map(int, input().split()))
A = [-a for a in A]

heapify(A)

for i in range(M):
    min_A = heappop(A)
    heappush(A, ceil(min_A/2))

print(-sum(A))

