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.util.*;
import java.io.*;
import java.math.*;

public class BasicJava
{
   public static InputReader in = new InputReader( System.in );
   public static OutputWriter out = new OutputWriter( System.out );
   
   public static void main(String[] args)
   {
      int n = in.nextInt();
      long[] a = new long[100010];
      long[] b = new long[100010];
      long[] sum = new long[100010];
      
      for (int i = 1; i <= n; i++) b[i] = in.nextInt();
      
      a[n] = b[n];
      sum[n] = a[n];
      
      for (int i = n-1; i >= 1; i--) {
         a[i] = b[i] - sum[i+2] + sum[i+1];
         sum[i] = sum[i+2] + a[i];
      }
      
      for (int i = 1; i <= n; i++) out.print(a[i]+" ");
      
      out.close();
   }
   
   static class InputReader
   {
       private InputStream stream;
       private byte[] buf = new byte[1024];
       private int curChar;
       private int numChars;
 
       public InputReader(InputStream stream)
       {
           this.stream = stream;
       }
 
       public InputReader(FileReader fileReader)
      {
         // TODO Auto-generated constructor stub
      }
 
      public int read()
       {
           if (numChars == -1)
               throw new InputMismatchException();
 
           if (curChar >= numChars)
           {
               curChar = 0;
               try
               {
                   numChars = stream.read(buf);
               } catch (IOException e)
               {
                   throw new InputMismatchException();
               }
               if (numChars <= 0)
                   return -1;
           }
 
           return buf[curChar++];
       }
 
       public int nextInt()
       {
           int c = read();
 
           while (isSpaceChar(c))
               c = read();
 
           int sgn = 1;
 
           if (c == '-')
           {
               sgn = -1;
               c = read();
           }
 
           int res = 0;
 
           do
           {
               if (c < '0' || c > '9')
                   throw new InputMismatchException();
 
               res *= 10;
               res += c & 15;
 
               c = read();
           } while (!isSpaceChar(c));
 
           return res * sgn;
       }
 
       public int[] nextIntArray(int arraySize)
       {
           int array[] = new int[arraySize];
 
           for (int i = 0; i < arraySize; i++)
               array[i] = nextInt();
 
           return array;
       }
 
       public long nextLong()
       {
           int c = read();
 
           while (isSpaceChar(c))
               c = read();
 
           int sign = 1;
 
           if (c == '-')
           {
               sign = -1;
 
               c = read();
           }
 
           long result = 0;
 
           do
           {
               if (c < '0' || c > '9')
                   throw new InputMismatchException();
 
               result *= 10;
               result += c & 15;
 
               c = read();
           } while (!isSpaceChar(c));
 
           return result * sign;
       }
 
       public long[] nextLongArray(int arraySize)
       {
           long array[] = new long[arraySize];
 
           for (int i = 0; i < arraySize; i++)
               array[i] = nextLong();
 
           return array;
       }
 
       public float nextFloat() // problematic
       {
           float result, div;
           byte c;
 
           result = 0;
           div = 1;
           c = (byte) read();
 
           while (c <= ' ')
               c = (byte) read();
 
           boolean isNegative = (c == '-');
 
           if (isNegative)
               c = (byte) read();
 
           do
           {
               result = result * 10 + c - '0';
           } while ((c = (byte) read()) >= '0' && c <= '9');
 
           if (c == '.')
               while ((c = (byte) read()) >= '0' && c <= '9')
                   result += (c - '0') / (div *= 10);
 
           if (isNegative)
               return -result;
 
           return result;
       }
 
       public double nextDouble() // not completely accurate
       {
           double ret = 0, div = 1;
           byte c = (byte) read();
 
           while (c <= ' ')
               c = (byte) read();
 
           boolean neg = (c == '-');
 
           if (neg)
               c = (byte) read();
 
           do
           {
               ret = ret * 10 + c - '0';
           } while ((c = (byte) read()) >= '0' && c <= '9');
 
           if (c == '.')
               while ((c = (byte) read()) >= '0' && c <= '9')
                   ret += (c - '0') / (div *= 10);
 
           if (neg)
               return -ret;
 
           return ret;
       }
 
       public String next()
       {
           int c = read();
 
           while (isSpaceChar(c)) c = read();
 
           StringBuilder res = new StringBuilder();
 
           do
           {
               res.appendCodePoint(c); c = read();
           } while (!isSpaceChar(c));
 
           return res.toString();
       }
 
       public boolean isSpaceChar(int c)
       {
           return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
       }
 
       public String nextLine()
       {
           int c = read();
 
           StringBuilder result = new StringBuilder();
 
           do
           {
               result.appendCodePoint(c);
 
               c = read();
           } while (!isNewLine(c));
 
           return result.toString();
       }
 
       public boolean isNewLine(int c) { return c == '\n'; }
 
       public void close()
       {
           try
           {
               stream.close();
           } catch (IOException e)
           {
               e.printStackTrace();
           }
       }
 
   }
 
   static class OutputWriter
   {
       private PrintWriter writer;
 
       public OutputWriter(OutputStream stream)
       {
           writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(
                   stream)));
       }
 
       public OutputWriter(Writer writer) { this.writer = new PrintWriter(writer); }
 
       public void println(int x) { writer.println(x); }
 
       public void print(int x) { writer.print(x); }
 
       public void println(char x) { writer.println(x); }
 
       public void print(char x) { writer.print(x); }
 
       public void println(int array[], int size)
       {
           for (int i = 0; i < size; i++) println(array[i]);
       }
 
       public void print(int array[], int size)
       {
           for (int i = 0; i < size; i++)
               print(array[i] + " ");
       }
 
       public void println(long x) { writer.println(x); }
 
       public void print(long x) { writer.print(x); }
 
       public void println(long array[], int size)
       {
           for (int i = 0; i < size; i++)
               println(array[i]);
       }
 
       public void print(long array[], int size)
       {
           for (int i = 0; i < size; i++)
               print(array[i]);
       }
 
       public void println(float num) { writer.println(num); }
 
        
       public void print(float num) { writer.print(num); }
 
       public void println(double num) { writer.println(num); }
 
       public void print(double num) { writer.print(num); }
 
       public void println(String s) { writer.println(s); }
 
       public void print(String s) { writer.print(s); }
 
       public void println() { writer.println(); }
 
       public void printSpace() { writer.print(" "); }
 
       public void printf(String format, Object args) { writer.printf(format, args); }
 
       public void flush() { writer.flush(); }
 
       public void close() { writer.close(); }
 
   }
}
