P13169 [HackerEarth] sonas number sequence
普及
题目描述

Sona is busy in organizing Port '16. Sona has to formulate two number sequence as two list. As she loves numbers she wrote the two number sequence in two different papers. Both the list have N numbers. She also named the number sequence as A and B where A = {a0,a1,...aN-1} and B = {b0,b1,..,bN-1} where as

b0 = a0/1

b1 = (a0+a1) / 2

b2 = (a0+a1+a2) / 3 and so on.

As she is busy in organizing Port '16 she lost the paper which had 'A' series paper. But she is confident that 'A' series can be generated from 'B' series by the above relation. You are provided with 'B' series paper.

Your task is to print the elements of A series.

Input :

First line contain an integer N - size of list B

Second line contains N space separated integers - elements of list B

Output :

Output N space separated integers - elements of list A

constraints

1≤N≤100

1≤value_of_each_element_in_list B≤10^9

SAMPLE INPUT
5
10 11 12 13 14

SAMPLE OUTPUT
10 12 14 16 18

输入格式

见题面

输出格式

见题面

样例输入
5 10 11 12 13 14 SAMPLE
样例输出
10 12 14 16 18