def input_int():
    return(int(input()))

def input_int_list():
    return(list(map(int,input().split())))

def input_int_map():
    return(map(int,input().split()))

import heapq

def run():
    n, ticket_count = input_int_map()

    nums = input_int_list()


    nums = list(map(lambda x: x * (-1), nums))  # 各要素を-1倍

    heapq.heapify(nums)



    for _ in range(ticket_count):
        num = (heapq.heappop(nums) * (-1))

        num = num // 2

        heapq.heappush(nums, num * (-1))

    nums = list(map(lambda x: x * (-1), nums))
    print(sum(nums))

run()

# 2 4 3

# 3 4 3

# 2 6 3














 def input_int():
    return(int(input())) input_int return(int(input())) int(input()) int input() input def input_int_list():
    return(list(map(int,input().split()))) input_int_list return(list(map(int,input().split()))) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split def input_int_map():
    return(map(int,input().split())) input_int_map return(map(int,input().split())) map(int,input().split()) map int input().split() ().split () input split import heapq heapq def run():
    n, ticket_count = input_int_map()

    nums = input_int_list()


    nums = list(map(lambda x: x * (-1), nums))  # 各要素を-1倍

    heapq.heapify(nums)



    for _ in range(ticket_count):
        num = (heapq.heappop(nums) * (-1))

        num = num // 2

        heapq.heappush(nums, num * (-1))

    nums = list(map(lambda x: x * (-1), nums))
    print(sum(nums)) run n, ticket_count = input_int_map() n input_int_map() input_int_map ticket_count nums = input_int_list() nums input_int_list() input_int_list nums = list(map(lambda x: x * (-1), nums)) nums list(map(lambda x: x * (-1), nums)) list map(lambda x: x * (-1), nums) map lambda x: x * (-1) x * (-1) x -1 x nums heapq.heapify(nums) heapq.heapify heapq heapify nums for _ in range(ticket_count):
        num = (heapq.heappop(nums) * (-1))

        num = num // 2

        heapq.heappush(nums, num * (-1))

     _ range(ticket_count) range ticket_count num = (heapq.heappop(nums) * (-1)) num heapq.heappop(nums) * (-1) heapq.heappop(nums) heapq.heappop heapq heappop nums -1 num = num // 2 num num // 2 num 2 heapq.heappush(nums, num * (-1)) heapq.heappush heapq heappush nums num * (-1) num -1 nums = list(map(lambda x: x * (-1), nums)) nums list(map(lambda x: x * (-1), nums)) list map(lambda x: x * (-1), nums) map lambda x: x * (-1) x * (-1) x -1 x nums print(sum(nums)) print sum(nums) sum nums run() run def run():
    n, ticket_count = input_int_map()

    nums = input_int_list()


    nums = list(map(lambda x: x * (-1), nums))  # 各要素を-1倍

    heapq.heapify(nums)



    for _ in range(ticket_count):
        num = (heapq.heappop(nums) * (-1))

        num = num // 2

        heapq.heappush(nums, num * (-1))

    nums = list(map(lambda x: x * (-1), nums))
    print(sum(nums)) def run():
    n, ticket_count = input_int_map()

    nums = input_int_list()


    nums = list(map(lambda x: x * (-1), nums))  # 各要素を-1倍

    heapq.heapify(nums)



    for _ in range(ticket_count):
        num = (heapq.heappop(nums) * (-1))

        num = num // 2

        heapq.heappush(nums, num * (-1))

    nums = list(map(lambda x: x * (-1), nums))
    print(sum(nums)) run def input_int_list():
    return(list(map(int,input().split()))) def input_int_list():
    return(list(map(int,input().split()))) input_int_list def input_int_map():
    return(map(int,input().split())) def input_int_map():
    return(map(int,input().split())) input_int_map def input_int():
    return(int(input())) def input_int():
    return(int(input())) input_int
def input_int():
    return(int(input()))

def input_int_list():
    return(list(map(int,input().split())))

def input_int_map():
    return(map(int,input().split()))

import heapq

def run():
    n, ticket_count = input_int_map()

    nums = input_int_list()


    nums = list(map(lambda x: x * (-1), nums))  # 各要素を-1倍

    heapq.heapify(nums)



    for _ in range(ticket_count):
        num = (heapq.heappop(nums) * (-1))

        num = num // 2

        heapq.heappush(nums, num * (-1))

    nums = list(map(lambda x: x * (-1), nums))
    print(sum(nums))

run()

# 2 4 3

# 3 4 3

# 2 6 3















