Kodi ("bedrockfake") has a bed full of $N$ rocks that are fake. Idok ("bedrockreal") thought it would be funny to replace some of Kodi's rocks with real rocks. Fake rocks have odd weight, while real rocks have even weight. Can you find the sum of weights of fake rocks on Kodi's bed?
Input
The first line consists of one integer, $N$.
The second line consists of $N$ integers, the weight of the rocks on Kodi's bed.
Output
Output an integer, the sum of weights of fake rocks $w_i$ on Kodi's bed.
Constraints
For all testcases: $1 \le N \le 10^6$, $1 \le w_i \le 1000$
Sample Test Cases
Input | Output | |
---|---|---|
5 2 3 4 5 6 |
8 | |
The rocks with weight 3 and 5 are fake. Their sum is 8. |
Scoring: Per Case
Authored by s17f18
Appeared in 2024 Mini Contest 2