n = gets.to_i
arr = gets.split(' ').map(&:to_i)
total = arr.sum
even_total = 0
for i in 0...n do
  next if i % 2 == 0
  even_total += arr[i]
end
results = [total - (2 * even_total)]
1.upto(n - 1) do |i|
  results.push(2 * arr[i - 1] - results[i - 1])
end
0.upto(n - 2) do |i|
  print "#{results[i]} "
end
puts results[n - 1]