Sum of list elements

Kotlin Easy lists

Task «Sum of list elements»

Write a program that reads an integer N, then N integers, and outputs the sum of all entered numbers. It is guaranteed that N is non-negative and the numbers fit into the Int type.

Input Format

First line contains an integer N (0 ≤ N ≤ 1000). Next, there are N lines, each containing one integer.

Output Format

Output a single integer — the sum of all entered numbers.

Examples

Example 1

INPUT
4 10 20 30 40
OUTPUT
100

Example 2

INPUT
4 1 2 3 4
OUTPUT
10
main.kt