#C5616. Total Apples Collected
Total Apples Collected
Total Apples Collected
In this problem, you are given the number of apple trees in an orchard and the number of apples produced by each tree. Your task is to compute the total number of apples collected from the orchard.
Let \(N\) denote the number of trees and \(a_1, a_2, \dots, a_N\) represent the number of apples produced by each tree. The total is given by the formula:
\[ S = \sum_{i=1}^{N} a_i \]You need to read the input from stdin and print the result to stdout.
inputFormat
The first line contains a single integer \(N\), representing the number of trees in the orchard. The second line contains \(N\) space-separated integers, where each integer indicates the number of apples produced by a tree.
outputFormat
Output a single integer: the total number of apples collected from the orchard.
## sample5
10 20 15 25 30
100