input=gets.chomp.to_i
waters=gets.chomp.split.map(&:to_i)
start=0
waters.each_with_index do|val, ind|
  if (ind+1)%2 == 1
    start = start+val
  else
    start = start-val
  end  
end  
answer= [start]
waters.each do|val|
  answer.push(2*(val-answer.last/2))
end  
puts answer.slice(0..-2)