#K65802. Alice's Problem Solving Marathon

    ID: 32278 Type: Default 1000ms 256MiB

Alice's Problem Solving Marathon

Alice's Problem Solving Marathon

Alice has planned a number of problems to solve over n days. On the i-th day, she plans to solve ai problems. Your task is to compute the total number of problems she will solve over the period.

In mathematical terms, given an integer n and a sequence of integers a1, a2, \dots, an, you are to calculate the sum:

\( S = \sum_{i=1}^{n} a_i \)

Note: The input starts with the integer n (the number of days), followed by a line containing n space-separated integers representing the planned problems for each day.

inputFormat

The first line of input contains a single integer n representing the number of days.

The second line contains n space-separated integers a1, a2, \dots, an, where ai is the number of problems planned for the i-th day.

outputFormat

Output a single integer representing the total number of problems solved over all n days.

## sample
4
3 5 2 7
17

</p>