n = gets.chomp.to_i
a = gets.chomp.split.map(&:to_i)

sum = 0
even = 0
odd = 0
n.times do |i|
  sum += a[i]
  even += a[i] if i.even?
  odd += a[i] if i.odd?
end
odd += a[0]

ans = []
ans[0] = even*2 - sum
ans[1] = odd*2 - sum

(2..(n-1)).each do |i|
  if i.even?
    even = even - a[i-2] + a[i-1]
    ans[i] = even*2 - sum
  else
    odd = odd - a[i-2] + a[i-1]
    ans[i] = odd*2 - sum
  end
end

puts(ans.join(" "))