program probC
  implicit none
  integer :: a(0:100010)
  integer i,ans1,n,del1,del2

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

  ans1=0
  do i =1,n+1
     ans1 = ans1 + abs(a(i-1)-a(i))
  end do

  do i = 1,n
     del1 = abs(a(i-1)-a(i))+abs(a(i)-a(i+1))
     del2 = abs(a(i-1)-a(i+1))

     write(*,*) ans1+del2-del1
  end do
  
end program probC
