#C3031. Maximum Possible Value

    ID: 46414 Type: Default 1000ms 256MiB

Maximum Possible Value

Maximum Possible Value

You are given a sequence of n integers. You are allowed to perform any number of operations where you can combine any of the integers. It turns out that the best strategy is to combine all the integers into one, so that the maximum possible value is simply the sum of all the integers.

In mathematical notation, if the sequence is \(a_1, a_2, \dots, a_n\), then the answer is:

[ \sum_{i=1}^{n} a_i ]

Your task is to compute this sum.

inputFormat

The input is given from standard input and consists of two lines:

  • The first line contains an integer n — the number of elements in the sequence.
  • The second line contains n space-separated integers representing the sequence.

outputFormat

Output to standard output a single integer — the maximum possible value after combining all the elements (i.e. the sum of all the integers).

## sample
3
1 2 3
6