By Vinicius Coelho
Brazil
SAP is promoting in its headquarters an event to train candidates for interviews, being presented by the illustrious boss Pietro and hosted in partnership with some universities from Brazil. A form for the interested candidates was created, with fields for basic data such as:
The amount of interested candidates was much larger than the expected by the organizers, making necessary the confection of lanyards for access into the event. Many booths for distributing the lanyards were created along the entrance of the building, each with a list of registered attendees. However, many of the registered candidates did not show up, leaving a surplus of lanyards. The organizer team wants to know how many people did show up, but, since they are too tired, they asked you to help.
The first line of each test is a single integer C (1 <= C <= 1000), representing the amount of registered candidates. The next line is composed of C integers separated by a space, each being 1 if the corresponding candidate joined the event, and 0 if he didn't.
The output should be a single integer, representing the amount of candidates that joined the event.
Input Sample | Output Sample |
10 |
8 |
8 |
5 |