Sum of vector elements

Rust Easy vectors

Task «Sum of vector elements»

Write a program that reads the number of elements and the vector of integers itself, and then calculates the sum of all its elements. Use standard input-output.

Input Format

The first line contains an integer N (1 ≤ N ≤ 1000) — the number of elements. The second line contains N integers separated by spaces.

Output Format

One integer — the sum of the vector elements.

Examples

Example 1

INPUT
3 1 2 3
OUTPUT
6

Example 2

INPUT
1 42
OUTPUT
42
main.rs