# -*- coding: utf-8 -*-
# D

import sys
from collections import defaultdict, deque
from heapq import heappush, heappop, heapify
import math
import bisect
input = sys.stdin.readline

# 再起回数上限変更
# sys.setrecursionlimit(1000000)

N, M = map(int, input().split())
a = list(map(int, input().split()))

q = []
for t in a:
    # heappush(q, (-t, 0))
    heappush(q, -t)
# print(q)

for m in range(M):
    val = heappop(q)
    val = (-val)//2
    heappush(q, -val)

print(-sum(q)) import sys sys from collections import defaultdict, deque from heapq import heappush, heappop, heapify import math math import bisect bisect input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline 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 q = [] q [] for t in a:
    # heappush(q, (-t, 0))
    heappush(q, -t)
# print(q) t a heappush(q, -t) heappush q -t t for m in range(M):
    val = heappop(q)
    val = (-val)//2
    heappush(q, -val) m range(M) range M val = heappop(q) val heappop(q) heappop q val = (-val)//2 val (-val)//2 -val val 2 heappush(q, -val) heappush q -val val print(-sum(q)) print -sum(q) sum(q) sum q q = [] [] q val = heappop(q) heappop(q) val input = sys.stdin.readline sys.stdin.readline input a = list(map(int, input().split())) list(map(int, input().split())) a val = (-val)//2 (-val)//2 val N, M = map(int, input().split()) map(int, input().split()) N M = map(int, input().split()) map(int, input().split()) M
# -*- coding: utf-8 -*-
# D

import sys
from collections import defaultdict, deque
from heapq import heappush, heappop, heapify
import math
import bisect
input = sys.stdin.readline

# 再起回数上限変更
# sys.setrecursionlimit(1000000)

N, M = map(int, input().split())
a = list(map(int, input().split()))

q = []
for t in a:
    # heappush(q, (-t, 0))
    heappush(q, -t)
# print(q)

for m in range(M):
    val = heappop(q)
    val = (-val)//2
    heappush(q, -val)

print(-sum(q))
