Rating changes for last rounds are temporarily rolled back. They will be returned soon.
×

The package for this problem was not updated by the problem writer or Codeforces administration after we've upgraded the judging servers. To adjust the time limit constraint, a solution execution time will be multiplied by 2. For example, if your solution works for 400 ms on judging servers, then the value 800 ms will be displayed and used to determine the verdict.

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

The problem statement has recently been changed. View the changes.

×
A. Cookies

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputOlga 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.

Examples

Input

1

1

Output

1

Input

10

1 2 2 3 4 4 4 2 2 2

Output

8

Input

11

2 2 2 2 2 2 2 2 2 2 99

Output

1

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.

Codeforces (c) Copyright 2010-2022 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: May/24/2022 15:55:44 (k3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|