N = gets.chomp.to_i
A = gets.chomp.split(" ").map(&:to_i)
x = [
    A.each_with_index.inject(0){|sum, (a, index)| sum + a * (-1) ** index},
    A.each_with_index.inject(0){|sum, (a, index)| sum + a * (-1) ** (index + 1)} + 2 * A[0]
]
for i in 2..N-1
    x << x[i-2] + 2 * (A[i-1] - A[i-2])
end
puts x.join(" ")