Problem A
Búðarkassi 1
Languages
en
is
Snædís just got her first job! She works at a register in a large store and now a row of customers are waiting to pay for their wares. Each customer brings a slew of wares and Snædís needs to calculate the total cost for each customers, doing so by adding up the individual costs of the wares.
Despite Snædís being very good at math she’d appreciate some help in calculating these total costs to speed things along. Can you help?
Input
The first line contains one integer, $1 \leq N \leq 100$, denoting the total number of wares the customer is purchasing. After that there are $N$ lines, each containing an integer $1 \leq x \leq 1\, 000$ denoting the cost of one ware.
Output
One line containing the total cost.
Explanation of Sample Inputs
In the first sample the customer has $4$ wares costing $100$, $200$, $10$ and $30$. The total cost is thus $100 + 200 + 10 + 30 = 340$.
Scoring
A solution gets $100$ points for solving the problem, $0$ points otherwise.
| Sample Input 1 | Sample Output 1 |
|---|---|
4 100 200 10 30 |
340 |
| Sample Input 2 | Sample Output 2 |
|---|---|
1 42 |
42 |
