n = gets.to_i
a = gets.chomp.split.map(&:to_i)
s = a.inject(:+)
res = Array.new(n, 0)
res[0] = s

(n / 2).times do |i|
  res[0] -= 2 * a[2 * i + 1]
end

(n - 1).times do |i|
  res[i + 1] = 2 * a[i] - res[i]
end
puts res.join(" ")