#K57507. Sum of Array Elements

    ID: 30435 Type: Default 1000ms 256MiB

Sum of Array Elements

Sum of Array Elements

You are given an array of integers. Your task is to compute the sum of its elements. This is a straightforward problem that tests basic input parsing and arithmetic operations. The input first provides an integer n which indicates the number of elements in the array, followed by n space-separated integers. Your program should output the sum of these integers.

Mathematically, if the array is \(a_1, a_2, \dots, a_n\), you need to compute the sum:

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

inputFormat

The first line of input contains an integer n (\(0 \leq n \leq 10^5\)), representing the number of elements in the array.

The second line contains n space-separated integers \(a_1, a_2, \dots, a_n\) (\(|a_i| \leq 10^9\)). If n is 0, the second line may be omitted.

outputFormat

Output a single integer which is the sum of the given array elements.

## sample
5
3 9 1 14 8
35