#arc120a. [arc120_a]Max Add
[arc120_a]Max Add
Problem Statement
For a sequence , let be the sum of its elements after the following is done:
- For each , in this order, do the following operation:
add the current maximum value of an element in to .
You are given a sequence of length : .
For each integer between and (inclusive), find when .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print lines. The -th line should contain when .
Sample Input 1
3
1 2 3
Sample Output 1
2
8
19
For example, when , is computed as follows:
- First, for , add to the current maximum value of , which is , making .
- Next, for , add to the current maximum value of , which is , making .
- Finally, for , add to the current maximum value of , which is , making .
- is the sum of the elements of now, which is .