#K58617. Maximizing the Final Coin Value

    ID: 30683 Type: Default 1000ms 256MiB

Maximizing the Final Coin Value

Maximizing the Final Coin Value

You are given a collection of n coins with integer values. In one operation, you can combine coins by summing their values. The objective is to determine the maximum possible value of the final coin, which is simply the sum of all the coin values.

Mathematically, if the coin values are \( coin_1, coin_2, \dots, coin_n \), then the maximum final coin value is given by the formula:

\( \text{Final Value} = \sum_{i=1}^{n} coin_i \)

Input is provided via standard input and output should be written to standard output.

inputFormat

The first line contains a single integer n (the number of coins). The second line contains n space-separated integers, representing the values of the coins.

outputFormat

Output the maximum possible value of the final coin, which is the sum of all the coin values.

## sample
3
1 2 3
6