Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/funksiya-massiv-yigindisi

Sum of an array

Easy 1000 ms 128 MB 32%
Share

Write a function ArraySum(a) that returns the sum of the elements of the integer array $a$.

Example 1: ArraySum([3, 1, 4]) → 8

Example 2: ArraySum([5, -2, 7, -1]) → 9

Write only the function body.

An array goes into the function ArraySum, which returns the sum of its elements

Input

One line with the array elements $a_{1}, a_{2}, \ldots, a_{n}$ — the argument of the function.

Output

The value returned by the function: an integer.

Note

$1 \le n \le 10^{5}$
$-10^{9} \le a_{i} \le 10^{9}$

Examples

Input #1
3 1 4
Output #1
8
Input #2
5 -2 7 -1
Output #2
9

Sign in to submit a solution

Signing up is free and takes a minute.