Sam07a, Omar, and Abd-Elmohaymen had only just stepped into the depths of the Unknown when they realized a crucial oversight. Their trusty "Unending Lantern" – a magical artifact that glowed perpetually – wasn't actually unending! It required a specific type of glowing moss, found only on ancient, gnarled trees, to keep its light strong.
Omar, ever practical, realized they needed to count how much moss they had collected. Each piece of moss, when placed in the lantern, burns for a certain number of hours. They have collected $$$N$$$ pieces of moss. For each piece $$$i$$$, they know it will burn for $$$H_i$$$ hours.
To ensure their path through the darkening forest remains illuminated, they need to know the total number of hours their lantern can stay lit if they use all the moss they have collected. They'll use one piece after another until all are gone.
Help Sam07a, Omar, and Abd-Elmohaymen calculate the total burn time.
An integer $$$N(1 \le N \le 1000)$$$ the number of pieces of moss. Then a line with $$$N$$$ integers $$$H_i(1 \le H_i \le 10^9)$$$. The number of hours the $$$i$$$th piece of moss will take to completely burn.
Print a single integer, the total burn time .
3 1 2 3
6
| Name |
|---|


