#K45062. Maximum Packages on Conveyors

    ID: 27670 Type: Default 1000ms 256MiB

Maximum Packages on Conveyors

Maximum Packages on Conveyors

You are given (n) conveyor belts with capacities (c_1, c_2, \ldots, c_n). The maximum number of packages that can be in transit simultaneously without exceeding any conveyor's capacity is simply the sum of all capacities, i.e., (\sum_{i=1}^{n} c_i). Your task is to compute this sum given the capacities of each conveyor.

For example, if the input capacities are [3, 5, 2, 4, 6], the output should be 20.

inputFormat

The input consists of two lines. The first line contains a single integer (n) representing the number of conveyors. The second line contains (n) space-separated integers denoting the capacities (c_1, c_2, \ldots, c_n).

outputFormat

Output a single integer which is the sum of all the conveyor capacities.## sample

5
3 5 2 4 6
20

</p>