'use strict';

function main(input) {
    const n = parseInt(input.shift());
    const m = parseInt(input.shift());
    const b = new BinaryHeap();
    for (var i = 0; i < n; i++) {
        b.push(parseInt(input.shift()));
    }
    for (var i = 0; i < m; i++) {
        b.push(b.pop() / 2);
    }
    var sum = 0;
    for (var i = 0; i < n; i++) {
        sum += Math.trunc(b.pop());
    }
    console.log(sum);
}

class BinaryHeap {
    static upHeap(heap, idx) {
        const parent = Math.trunc(idx / 2);
        if (heap[parent] < heap[idx]) {
            const tmp = heap[idx];
            heap[idx] = heap[parent];
            heap[parent] = tmp;
            BinaryHeap.upHeap(heap, parent);
        }
    }
    static downHeap(heap, idx) {
        const childL = idx * 2;
        const childR = childL + 1;
        var target = idx;
        if (heap[target] < heap[childL]) {
            target = childL;
        }
        if (heap[target] < heap[childR]) {
            target = childR;
        }
        if (target != idx) {
            const tmp = heap[target];
            heap[target] = heap[idx];
            heap[idx] = tmp;
            BinaryHeap.downHeap(heap, target);
        }
    }
    constructor() {
        this.heap = new Array(1); // first is unused
    }
    push(data) {
        const index = this.heap.push(data) - 1;
        BinaryHeap.upHeap(this.heap, index);
    }
    pop() {
        const index = 1;
        const data = this.heap[index];
        this.heap[index] = this.heap.pop();
        BinaryHeap.downHeap(this.heap, index);
        return data;
    }
}

if (process.argv[1] == __filename) {
    const input = require('fs').readFileSync('/dev/stdin', 'utf-8').split(/\s/);
    main(input);
}
