program main
  implicit none
  integer(8) i,N,n_min,j,t1
  integer(8),allocatable :: A(:)
  integer(8),allocatable :: rain(:)
  !integer(8),allocatable :: V(:,:)
  read(*, *) N
  allocate(A(N))
  allocate(rain(N))
  !allocate(V(N,N))
  read(*, *) (A(i), i = 1,N)
  !V = 1
  rain = 0
  do i = 1,N
    do j = 1,N
      if (i<j) then
        if (mod(i,2) == mod(j,2)) then
          rain(i) = rain(i) - A(j)
        else
          rain(i) = rain(i) + A(j)
        end if
      else if (i>j) then
        if (mod(i,2) == mod(j,2)) then
          rain(i) = rain(i) + A(j)
        else
          rain(i) = rain(i) - A(j)
        end if
      end if
    end do
  end do
  
  write(*,*) rain
end program main
