var arr=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}

let n = arr[0]
let m = arr[1]

var a=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}

var sa = a.sort()

//print( sa )

var p = n - 1

var mc = 0

while ( 1 == 1 ) {
  if( mc >= m ) {
    //print( mc )
    break
  }
  
  sa[p] = sa[p] / 2
  sa = sa.sort()
  mc += 1
}

var i = 0
var o = 0
for i in 0..<n {
  o += sa[i]
}

print( o )
