N = gets.to_i
A = gets.split(' ').map(&:to_i)
sum_x = A.inject(:+) / 2
x_1 = sum_x
1.step(N-1, 2) do |i|
  x_1 -= A[i]
end
print "#{2*x_1} "
x_prev = x_1
(1..N-1).each do |i|
  x_now = A[i-1] - x_prev
  print "#{2*x_now} "
  x_prev = x_now
end
puts