n=gets.chomp.to_i
l=gets.chomp.split(" ").map{|s| s.to_i}
m=[]
m[1]=0
for i in 0..n-1
  m[1]+=l[i]  if i%2==0
  m[1]-=l[i]  if i%2==1
end
m[1]=m[1]/2

i=n-1
m[n]=l[n-1]-m[1]

while i!=1
  m[i]=l[i-1]-m[i+1]
  i-=1
end

for i in 1..n
  print "#{m[i]*2} "
end

printf "\b"