n = gets.to_i
arr = gets.split(' ').map(&:to_i)
sum = arr.sum
even_sum = 0
arr.each_with_index do |v, i|
  next if i % 2 == 0
  even_sum += v
end
results = [sum - 2 * even_sum]
1.upto(n - 1) do |i|
  results.push(2 * arr[i - 1] - results[i - 1])
end
puts results.join(' ')