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.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;

import java.util.*;
import java.util.Map.Entry;


 
public class george
{
    static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;
 
        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
 
        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
 
        public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }
 
        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');
 
            if (neg)
                return -ret;
            return ret;
        }
 
        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }
 
        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
 
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
 
            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }
 
            if (neg)
                return -ret;
            return ret;
        }
 
        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }
 
        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }
 
        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }
    static int min(int []arr,int n) {
    int min=arr[0],k=-1;
    for(int i=0;i<n;i++) {
    	if(min>arr[i]) {
    		k=arr[i];
    	}
    }
    return k;
    }
    static int max(int []arr,int n) {
        int max=arr[0],k=-1;
        for(int i=1;i<n;i++) {
        	if(arr[i]>max) 
        		k=arr[i];
        }
        return k;
        }
static long gcd(long a,long b) {
	if (b==0) return a;
	return gcd(b,a%b);
}
static long lcm(long a,long b) {

	return a*b/gcd(a,b);
}
static int tprime(int n) {
int a=1;
	for(int i=2;i<=n;i++) {
		if(n%i==0) {
			System.out.println(i);
			a++;
		}
	}
	return a;
}
static long fact(int n){    
	long fact1=1;  
	      
	  for(int i=1;i<=n;i++){    
	      fact1=fact1*i;    
	  }   
	  return fact1;
	 }    
static void sort(int a[], int n)
{
    int temp;
	for (int i = 0; i < n; i++) 
    {
        for (int j = i + 1; j < n; j++) 
        {
            if (a[i] < a[j]) 
            {
                temp = a[i];
                a[i] = a[j];
                a[j] = temp;
            }
        }
    }
}
static void printArray(int arr[],int n)
{
	for(int i=0;i<n;i++) {
    System.out.print(arr[i]+" ");
    }
	System.out.println();
}
public static boolean ASC = false;
    public static void main(String[] args) throws IOException
    {
        Reader s=new Reader();
        int n;
 n=s.nextInt();
 int arr[]=new int[n];
 for(int i=0; i < n; i++){
     arr[i]=s.nextInt();
 }
 int ans[]=new int[n];
 for(int i = n-1; i >=0; i--){
     if(i==n-1) ans[i] = arr[i];
     else ans[i] = arr[i] + arr[i+1];
 }
 for(int i=0; i < n; i++){
   System.out.print(ans[i]+" ");
 }
}
}