import java.util.PriorityQueue
import java.util.Collections

fun main(args: Array<String>) {
    val (n, m) = readLine()!!.split(" ").map(String::toInt)
    val a = PriorityQueue<Long>(n, Collections.reverseOrder()).apply {
        readLine()!!.split(" ").forEach { add(it.toLong()) }
    }

    repeat(m) {
        a.run { add(poll() / 2) }
    }

    println(a.toList().sum())
}