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

asum = 0

A.each_with_index do |a, i|
  asum += a * ((-1) ** i)
end

result = [asum]

(N-1).times do |i|
  result << A[i] * 2 - asum
  asum -= A[i] * 2
end

puts result.join(' ')
