N = gets.to_i
A = gets.split(' ').map(&:to_i)

allrain = A.inject(:+)

x = Array.new
otherrain = 0
(N/2).times do |ji|
	otherrain += A[(1+i*2)%N]*2
end
x[0] = allrain - otherrain

(1..N-1).each do |i|
	x[i] = 2*A[i] - x[i-1]
end

N.times do |i|
	print x[i].to_s + " "
end