program D
    implicit none
    integer::n,m,i,ans
    integer,allocatable::a(:)
    read*,n,m
    allocate(a(n))
    read*,a
    if ( n == 1) then
        ans = (a(0) / 2 ) ** m
    else
        do i = 0 , m
            a(maxloc(a,1)) = a(maxloc(a,1)) / 2 
        end do
        ans = sum(a)
    end if
    print*,ans
end program D