#C9091. Total T-Shirts Required
Total T-Shirts Required
Total T-Shirts Required
You are organizing a team event where each group of participants will receive a t-shirt. Given the number of participants in each group, your task is to determine the total number of t-shirts needed.
The total number of t-shirts required is calculated using the formula: \(T = \sum_{i=1}^{n} a_i\), where \(a_i\) denotes the number of participants in the \(i^{th}\) group and \(n\) is the total number of groups.
inputFormat
The input is read from standard input (stdin) and has the following format:
- The first line contains an integer \(n\) representing the number of groups.
- The second line contains \(n\) space-separated integers where each integer \(a_i\) represents the number of participants in the \(i^{th}\) group.
If \(n=0\), then no further numbers will be provided.
outputFormat
Output a single integer to standard output (stdout) representing the total number of t-shirts required. This is the sum of all the integers provided for each group.
## sample3
5 10 15
30