N = gets.to_i
As = gets.split.map(&:to_i)

even_sum = 0
As.each.with_index(1){|v,i|
    even_sum += v if i % 2 == 0
}
x = As.sum - 2 * even_sum
ans = [x]
tmp = x
As.each{|a|
    next_x = 2 * a - tmp
    ans.push(next_x)
    tmp = next_x
}
#ans.pop
#puts ans.join(" ")
#p "hello"