Public Class Program
  Shared Sub Main()
    Dim nm As Long() = Array.ConvertAll(Of String, Long)(Console.ReadLine().Split(" "), AddressOf Long.Parse)
    Dim n As Long = nm(0)
    Dim m As Long = nm(1)
    Dim a As Long() = Array.ConvertAll(Of String, Long)(Console.ReadLine().Split(" "), AddressOf Long.Parse)
    Array.Sort(a)
    Do While m > 0
      a(n - 1) = a(n - 1) \ 2
      m -= 1
      For i As Long = n - 2 To 0 Step -1
        If a(n - 1) < a(i) Then
          Array.Sort(a)
          Exit For
        End If
        a(i) = a(i) \ 2
        m -= 1
        If m <= 0 Then Exit For
      Next
    Loop
    Dim ans As Long = 0
    For i As Long = 0 To n - 1
      ans += a(i)
    Next
    Console.WriteLine(ans.ToString())
  End Sub
End Class