The following languages are only available languages for the problems from the contest

Surprise Language Round #7:

- FALSE

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

F. Pairwise Sums

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputYou are given an array of *n* integers. For each element output the sum of itself and the previous element. For the first element, output the sum of the first and the last elements of the array.

Input

The input consists of a single line of space-separated integers. The first number is *n* (2 ≤ *n* ≤ 50) — the size of the array. The following *n* numbers are the elements of the array (1 ≤ *a*_{i} ≤ 1000).

Output

Output the sums *a*_{1} + *a*_{n}, *a*_{2} + *a*_{1}, ..., *a*_{n} + *a*_{n - 1}, separated with spaces.

Examples

Input

4 1 2 3 4

Output

5 3 5 7

Input

5 5 46 372 81 9

Output

14 51 418 453 90

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Mar/23/2019 12:45:56 (f2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|