function Main(input) {
      input =  input.split("\n");

      var info = input[0].split(" ");

      var shouhin_num = parseInt(info[0], 10);
      var ticket_num = parseInt(info[1], 10);

      var shouhins = input[1].split(" ").map( a => parseInt(a,10) );

      for(var j=0; j<ticket_num; j++){
         var temp = 0;
         var temp_val =0;
         for(var i=0; i<shouhin_num; i++){
             if( temp_val < shouhins[i] ){
                   temp_val = shouhins[i];
                   temp = i;
             }
         }
         shouhins[temp] *= 0.5;
      }

      var total = shouhins.reduce((a, b) => a + b );

      console.log( Math.round(total) );
}
 
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));