import scala.collection.mutable
import scala.io.StdIn
import java.util._

object Main extends App {
  val l = StdIn.readLine().split(" ").map(_.toInt)
  val n = l(0)
  val m = l(1)

  var q = new mutable.PriorityQueue[Long]()
  StdIn.readLine().split(" ").foreach(i => q += i.toLong)
  for (i <- 0 until m){
    q += (q.dequeue()/2)
  }
  println(q.toArray.reduceRight(_.asInstanceOf[Long] + _.asInstanceOf[Long]))
}
