import scala.io.StdIn._
import scala.collection.mutable.PriorityQueue

object Main {
  def main(args: Array[String]) = {
    val Array(n, m) = readLine().split(" ").map(_.toInt)
    val q = PriorityQueue[Long]() ++ readLine().split(" ").map(_.toLong)
    for(_ <- 0 until m) {
      q.enqueue(q.dequeue()/2)
    }
    println(q.sum)
  }
}
    
