implicit none

integer(8) :: n
integer(8), allocatable :: a(:)
integer(8) :: i
integer(8) :: s, s1, s2, ss

read *, n
allocate(a(0:n+1))
a(0) = 0
a(n+1) = 0
read *, (a(i), i=1,n)

s = 0
do i = 1, n+1
  s = s + abs(a(i)-a(i-1))
enddo

s1 = abs(a(1) - a(0))
do i = 1, n
   s2 = abs(a(i+1) - a(i))
   ss = abs(a(i+1) - a(i-1))
   write(6,'(i0)') s - s1 - s2 + ss
   s1 = s2
enddo
stop
end