#!usr/bin/env python3
from collections import defaultdict, deque, Counter, OrderedDict
import collections, heapq, itertools, bisect
import math, fractions
import sys, copy

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LIM(): return [-int(x) for x in sys.stdin.readline().split()]
def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline().rstrip())
def LS(): return [list(x) for x in sys.stdin.readline().split()]
def S(): return list(sys.stdin.readline().rstrip())
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
MOD = 1000000007

def main():
    N, M = LI()
    A = LIM()
    heapq.heapify(A)
    for _ in range(M):
        x = -heapq.heappop(A)
        heapq.heappush(A, -(x // 2))
    print(-sum(A))

if __name__ == '__main__':
    main() from collections import defaultdict, deque, Counter, OrderedDict import collections, heapq, itertools, bisect collections heapq itertools bisect import math, fractions math fractions import sys, copy sys copy int(x) for x in sys.stdin.readline().split() for x in sys.stdin.readline().split() x sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split for x in sys.stdin.readline().split() int(x) int x def LI(): return [int(x) for x in sys.stdin.readline().split()] LI -int(x) for x in sys.stdin.readline().split() for x in sys.stdin.readline().split() x sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split for x in sys.stdin.readline().split() -int(x) int(x) int x def LIM(): return [-int(x) for x in sys.stdin.readline().split()] LIM int(x) - 1 for x in sys.stdin.readline().split() for x in sys.stdin.readline().split() x sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split for x in sys.stdin.readline().split() int(x) - 1 int(x) int x 1 def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()] LI1 def I(): return int(sys.stdin.readline().rstrip()) I list(x) for x in sys.stdin.readline().split() for x in sys.stdin.readline().split() x sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split for x in sys.stdin.readline().split() list(x) list x def LS(): return [list(x) for x in sys.stdin.readline().split()] LS def S(): return list(sys.stdin.readline().rstrip()) S I() for i in range(n) for i in range(n) i range(n) range n for i in range(n) I() I def IR(n): return [I() for i in range(n)] IR n n LI() for i in range(n) for i in range(n) i range(n) range n for i in range(n) LI() LI def LIR(n): return [LI() for i in range(n)] LIR n n S() for i in range(n) for i in range(n) i range(n) range n for i in range(n) S() S def SR(n): return [S() for i in range(n)] SR n n LS() for i in range(n) for i in range(n) i range(n) range n for i in range(n) LS() LS def LSR(n): return [LS() for i in range(n)] LSR n n sys.setrecursionlimit(1000000) sys.setrecursionlimit sys setrecursionlimit 1000000 dire = [[1, 0], [0, 1], [-1, 0], [0, -1]] dire [[1, 0], [0, 1], [-1, 0], [0, -1]] [1, 0] 1 0 [0, 1] 0 1 [-1, 0] -1 0 [0, -1] 0 -1 dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]] dire8 [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]] [1, 0] 1 0 [1, 1] 1 1 [0, 1] 0 1 [-1, 1] -1 1 [-1, 0] -1 0 [-1, -1] -1 -1 [0, -1] 0 -1 [1, -1] 1 -1 MOD = 1000000007 MOD 1000000007 def main():
    N, M = LI()
    A = LIM()
    heapq.heapify(A)
    for _ in range(M):
        x = -heapq.heappop(A)
        heapq.heappush(A, -(x // 2))
    print(-sum(A)) main N, M = LI() N LI() LI M A = LIM() A LIM() LIM heapq.heapify(A) heapq.heapify heapq heapify A for _ in range(M):
        x = -heapq.heappop(A)
        heapq.heappush(A, -(x // 2))
     _ range(M) range M x = -heapq.heappop(A) x -heapq.heappop(A) heapq.heappop(A) heapq.heappop heapq heappop A heapq.heappush(A, -(x // 2)) heapq.heappush heapq heappush A -(x // 2) x // 2 x 2 print(-sum(A)) print -sum(A) sum(A) sum A if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def LSR(n): return [LS() for i in range(n)] def LSR(n): return [LS() for i in range(n)] LSR def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()] def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()] LI1 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI(): return [int(x) for x in sys.stdin.readline().split()] LI def LIR(n): return [LI() for i in range(n)] def LIR(n): return [LI() for i in range(n)] LIR dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]] [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]] dire8 def IR(n): return [I() for i in range(n)] def IR(n): return [I() for i in range(n)] IR def S(): return list(sys.stdin.readline().rstrip()) def S(): return list(sys.stdin.readline().rstrip()) S MOD = 1000000007 1000000007 MOD def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I def LS(): return [list(x) for x in sys.stdin.readline().split()] def LS(): return [list(x) for x in sys.stdin.readline().split()] LS dire = [[1, 0], [0, 1], [-1, 0], [0, -1]] [[1, 0], [0, 1], [-1, 0], [0, -1]] dire def main():
    N, M = LI()
    A = LIM()
    heapq.heapify(A)
    for _ in range(M):
        x = -heapq.heappop(A)
        heapq.heappush(A, -(x // 2))
    print(-sum(A)) def main():
    N, M = LI()
    A = LIM()
    heapq.heapify(A)
    for _ in range(M):
        x = -heapq.heappop(A)
        heapq.heappush(A, -(x // 2))
    print(-sum(A)) main def SR(n): return [S() for i in range(n)] def SR(n): return [S() for i in range(n)] SR def LIM(): return [-int(x) for x in sys.stdin.readline().split()] def LIM(): return [-int(x) for x in sys.stdin.readline().split()] LIM
#!usr/bin/env python3
from collections import defaultdict, deque, Counter, OrderedDict
import collections, heapq, itertools, bisect
import math, fractions
import sys, copy

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LIM(): return [-int(x) for x in sys.stdin.readline().split()]
def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline().rstrip())
def LS(): return [list(x) for x in sys.stdin.readline().split()]
def S(): return list(sys.stdin.readline().rstrip())
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
MOD = 1000000007

def main():
    N, M = LI()
    A = LIM()
    heapq.heapify(A)
    for _ in range(M):
        x = -heapq.heappop(A)
        heapq.heappush(A, -(x // 2))
    print(-sum(A))

if __name__ == '__main__':
    main()