N=gets.to_i
as=gets.split.map(&:to_i)
dam=Array.new(N+1)
fall=Array.new(N+1)
for i in 1..N
    dam[i]=as.shift
end
fall[1]=(1..N).to_a.map{|x|dam[x]*(x.odd? ? 1 : -1)}.inject(:+)
for i in 2..N
    fall[i]=2*dam[i-1]-fall[i-1]
end
puts fall[1..-1].join(" ")
