# -*- coding: utf-8 -*-
import numpy as np
import sys
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect
from scipy.special import comb
import copy
sys.setrecursionlimit(10**6)


def zz():
    return list(map(int, sys.stdin.readline().split()))


def z():
    return int(sys.stdin.readline())


def S():
    return sys.stdin.readline()[:-1]


def C(line):
    return [sys.stdin.readline() for _ in range(line)]


N, M = zz()
A = zz()
A = [-a for a in A]
heapq.heapify(A)

for i in range(M):
    money = heapq.heappop(A)
    money *= -1
    money //= 2
    money *= -1
    heapq.heappush(A, money)
print(sum(A)*-1) import numpy as np numpy import sys sys from collections import deque from collections import defaultdict import heapq heapq import collections collections import itertools itertools import bisect bisect from scipy.special import comb import copy copy sys.setrecursionlimit(10**6) sys.setrecursionlimit sys setrecursionlimit 10**6 10 6 def zz():
    return list(map(int, sys.stdin.readline().split())) zz return list(map(int, sys.stdin.readline().split())) list(map(int, sys.stdin.readline().split())) list map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split def z():
    return int(sys.stdin.readline()) z return int(sys.stdin.readline()) int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline def S():
    return sys.stdin.readline()[:-1] S return sys.stdin.readline()[:-1] sys.stdin.readline()[:-1] sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline :-1 -1 def C(line):
    return [sys.stdin.readline() for _ in range(line)] C sys.stdin.readline() for _ in range(line) for _ in range(line) _ range(line) range line for _ in range(line) sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline return [sys.stdin.readline() for _ in range(line)] [sys.stdin.readline() for _ in range(line)] line line N, M = zz() N zz() zz M A = zz() A zz() zz -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] heapq.heapify(A) heapq.heapify heapq heapify A for i in range(M):
    money = heapq.heappop(A)
    money *= -1
    money //= 2
    money *= -1
    heapq.heappush(A, money) i range(M) range M money = heapq.heappop(A) money heapq.heappop(A) heapq.heappop heapq heappop A money *= -1 money -1 money //= 2 money 2 money *= -1 money -1 heapq.heappush(A, money) heapq.heappush heapq heappush A money print(sum(A)*-1) print sum(A)*-1 sum(A) sum A -1 A = [-a for a in A] [-a for a in A] A money //= 2 2 money money = heapq.heappop(A) heapq.heappop(A) money def S():
    return sys.stdin.readline()[:-1] def S():
    return sys.stdin.readline()[:-1] S money *= -1 -1 money M = zz() zz() M money *= -1 -1 money N, M = zz() zz() N def C(line):
    return [sys.stdin.readline() for _ in range(line)] def C(line):
    return [sys.stdin.readline() for _ in range(line)] C def z():
    return int(sys.stdin.readline()) def z():
    return int(sys.stdin.readline()) z A = zz() zz() A def zz():
    return list(map(int, sys.stdin.readline().split())) def zz():
    return list(map(int, sys.stdin.readline().split())) zz
# -*- coding: utf-8 -*-
import numpy as np
import sys
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect
from scipy.special import comb
import copy
sys.setrecursionlimit(10**6)


def zz():
    return list(map(int, sys.stdin.readline().split()))


def z():
    return int(sys.stdin.readline())


def S():
    return sys.stdin.readline()[:-1]


def C(line):
    return [sys.stdin.readline() for _ in range(line)]


N, M = zz()
A = zz()
A = [-a for a in A]
heapq.heapify(A)

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