object Main extends App {

  val inputnm = scala.io.StdIn.readLine()
  val nmArray = inputnm.split(" ").map(_.toInt).toVector
  val inputa = scala.io.StdIn.readLine()

  val n = nmArray(0)
  val m = nmArray(1)
  var aArray = inputa.split(" ").map(_.toLong).toVector

  (1 to m).foreach { _ =>
    val max = aArray.max
    aArray = aArray.updated(aArray.indexWhere(_ == max), max / 2L)
  }

  println(aArray.sum)

}