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) );
      shouhins.sort( (a,b) => b-a );

      for(var j=0; j<ticket_num; j++){
         var  max_val = Math.max.apply(null, shouhins);
         var max_num = shouhins.indexOf( max_val );
         shouhins[ max_num ] = Math.floor( shouhins[ max_num ] *0.5 );
      }

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

      console.log(  total );
}
 


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