let 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))! }
a.sortInPlace()

let lastIndex = n - 1

for i in 0..<m {
  a[lastIndex] = a[lastIndex]/2
  a.sortInPlace()
}

var price = 0

for p in a {
  price += p
}

print(price)