import scala.io.StdIn
import scala.math._
object Main extends App {
  var List(n,m) = StdIn.readLine().split(" ").map(_.toInt).toList
  var a = StdIn.readLine().split(" ").map(_.toLong).sorted.reverse
  var i = 0
  while (m > 0) {
    a(i) = ceil(a(i) / 2).toLong
    m = m - 1
    if (a.length > i+1 && a(i) < a(i+1)) {
      val t = a(i+1)
      a(i+1) = a(i)
      a(i) = t
    }
  }
  println(a.sum)
}
