import scala.collection.mutable.PriorityQueue

object Main{
  def main(args: Array[String]){
    val input=io.Source.stdin.getLines().mkString("\n");
    println(solve(input).trim());
  }

  def solve(input:String):String={
    val Array(nm,aas)=input.split("\n");
    val Array(n,m)=nm.split(" ").map(_.toInt)
    val as=aas.split(" ").map(_.toLong)
    val pq = new PriorityQueue[Long]
    for(a <- as){
      pq.enqueue(a)
    }
    for(i <- 1 to m){
      pq.enqueue(pq.dequeue/2)
    }
    pq.toList.sum.toString
  }
}
