Codeforces Beta Round 94 (Div. 2 Only)
A
Cookies
Codeforces
900
原题
←B →
翻译中…

Olga came to visit the twins Anna and Maria and saw that they have many cookies. The cookies are distributed into bags. As there are many cookies, Olga decided that it's no big deal if she steals a bag. However, she doesn't want the sisters to quarrel because of nothing when they divide the cookies. That's why Olga wants to steal a bag with cookies so that the number of cookies in the remaining bags was even, that is, so that Anna and Maria could evenly divide it into two (even 0 remaining cookies will do, just as any other even number). How many ways there are to steal exactly one cookie bag so that the total number of cookies in the remaining bags was even?

翻译中…

Input

翻译中…

The first line contains the only integer $*n*$ ($1 ≤ *n* ≤ 100$) — the number of cookie bags Anna and Maria have. The second line contains $*n*$ integers $*a*_{*i*}$ ($1 ≤ *a*_{*i*} ≤ 100$) — the number of cookies in the $*i*$-th bag.

翻译中…

Output

翻译中…

Print in the only line the only number — the sought number of ways. If there are no such ways print 0.

翻译中…

Note

翻译中…

In the first sample Olga should take the only bag so that the twins ended up with the even number of cookies.

翻译中…

In the second sample Olga can take any of five bags with two cookies or any of three bags with four cookies — $5 + 3 = 8$ ways in total.

翻译中…

In the third sample, no matter which bag with two cookies Olga chooses, the twins are left with $2 * 9 + 99 = 117$ cookies. Thus, Olga has only one option: to take the bag with $99$ cookies.

翻译中…

样例

Input #1
1
1
Output #1
1
InputCopy OutputCopy
Input #2
10
1 2 2 3 4 4 4 2 2 2
Output #2
8
InputCopy OutputCopy
Input #3
11
2 2 2 2 2 2 2 2 2 2 99
Output #3
1
InputCopy OutputCopy
题目信息
题号
129A
时间限制
2 s
内存限制
256 MB
标签
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。