There are n integers b1, b2, ..., bn written in a row. For all i from 1 to n, values ai are defined by the crows performing the following procedure:

  * The crow sets ai initially 0. 
  * The crow then adds bi to ai, subtracts bi + 1, adds the bi + 2 number, and so on until the n'th number. Thus, ai = bi - bi + 1 + bi + 2 - bi + 3.... 



Memory gives you the values a1, a2, ..., an, and he now wants you to find the initial numbers b1, b2, ..., bn written in the row? Can you do it?

Input

The first line of the input contains a single integer n (2 ≤ n ≤ 100 000) — the number of integers written in the row.

The next line contains n, the i'th of which is ai ( - 109 ≤ ai ≤ 109) — the value of the i'th number.

Output

Print n integers corresponding to the sequence b1, b2, ..., bn. It's guaranteed that the answer is unique and fits in 32-bit integer type.

Examples

Input

5
6 -4 8 -2 3


Output

2 4 6 1 3 


Input

5
3 -2 -1 5 6


Output

1 -3 4 11 6 

Note

In the first sample test, the crows report the numbers 6, - 4, 8, - 2, and 3 when he starts at indices 1, 2, 3, 4 and 5 respectively. It is easy to check that the sequence 2 4 6 1 3 satisfies the reports. For example, 6 = 2 - 4 + 6 - 1 + 3, and  - 4 = 4 - 6 + 1 - 3.

In the second sample test, the sequence 1,  - 3, 4, 11, 6 satisfies the reports. For example, 5 = 11 - 6 and 6 = 6.

import java.awt.Point;
import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Double.parseDouble;
import static java.lang.String.*;

public class Main {

    static StringBuilder a = new StringBuilder();

    public static void main(String[] args) throws IOException {
//        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
//(new FileReader("input.in"));
        StringBuilder out = new StringBuilder();
//        StringTokenizer tk;
//        tk = new StringTokenizer(in.readLine());
        //Scanner Reader = new Scanner(System.in);
        Reader.init(System.in);
        int n = Reader.nextInt();
        long []a=new long[n];
      
        for (int i = 0; i < n; i++) {
            a[i]=Reader.nextInt();
           
        }
        for (int i = 0; i < n-1; i++) {
            System.out.print((a[i]+a[i+1])+" ");
        }
        System.out.println(a[n-1]);
      
    }

}

//class card implements Comparator<card>{
//int x,y;
//public card(){}
//public card(int a,int b){
//    x=a;
//    y=b;
//}
//
// 
//    public int compare(card o1, card o2) {
//        if (o1.y> o2.y) {
//            return 1;
//        } else if (o1.y < o2.y) {
//            return -1;
//        }
//        return 0;
//    }
//   
//
//  
//}
class Reader {

    static StringTokenizer tokenizer;
    static BufferedReader reader;

    public static void init(InputStream input) throws UnsupportedEncodingException {
        reader = new BufferedReader(new InputStreamReader(input, "UTF-8"));
        tokenizer = new StringTokenizer("");
    }

    public static String next() throws IOException {
        while (!tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

    public static String nextLine() throws IOException {
        return reader.readLine();
    }

    public static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    public static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    public static long nextLong() throws IOException {
        return Long.parseLong(next());
    }
}
