N = gets.to_i
A = gets.split(" ").map(&:to_i)
ans = Array.new(N, 0)
ans[0] = A.inject(:+)
j = 1
while j < N  do
    ans[0] -= 2 * A[j] 
    j += 2
end

(N - 1).times do |i|
    ans[i + 1] = 2 * A[i] - ans[i]
end

puts ans.join(" ")