import java.io.{BufferedReader, InputStreamReader}

import scala.collection.mutable

object Main {
  def main(args: Array[String]): Unit = {
    val in = new BufferedReader(new InputStreamReader(System.in))

    val Array(n, m) = in.readLine.split("\\s+").map(_.toInt)
    var prices = mutable.PriorityQueue(in.readLine.split("\\s+").map(_.toLong): _*)

    (1 to m).foreach { _ =>
      prices.enqueue(prices.dequeue() / 2)
    }

    System.out.println(prices.sum)
  }
}
