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