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++){
         if(shouhins[0]<shouhins[1]){ narabikae(shouhins); }
         shouhins[0] = Math.floor(shouhins[0]*0.5);
      }

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

      console.log(  total );
}
 
function narabikae(arr){
     var temp = arr[0];
     for(var i=2; i<arr.length; i++){
         if( arr[0]>arr[i]){
            arr.splice( i, 0, arr.shift[0]) ;
         }
     }
     arr.push( arr.shift[0] );
     return arr;
}


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