Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-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.

This round has an unusual addition to the rules. For each problem you must use distinct language. Thus, if you have a submission that has passed at least one test or is being tested at the moment, then for this task you can use only this language and can not use it for other tasks. More details can be read by the link. Different implementations of the same language are considered to be the same language (for example, in C++ you can only solve one problem, regardless of the exact chosen compiler).

No tag edit access

G. Large Bouquets

time limit per test

1 secondmemory limit per test

256 megabytesinput

standard inputoutput

standard outputA flower shop has got *n* bouquets, and the *i*-th bouquet consists of *a*_{i} flowers. Vasya, the manager of the shop, decided to make large bouquets from these bouquets.

Vasya thinks that a bouquet is large if it is made of two or more initial bouquets, and there is a constraint: the total number of flowers in a large bouquet should be odd. Each of the initial bouquets can be a part of at most one large bouquet. If an initial bouquet becomes a part of a large bouquet, all its flowers are included in the large bouquet.

Determine the maximum possible number of large bouquets Vasya can make.

Input

The first line contains a single positive integer *n* (1 ≤ *n* ≤ 10^{5}) — the number of initial bouquets.

The second line contains a sequence of integers *a*_{1}, *a*_{2}, ..., *a*_{n} (1 ≤ *a*_{i} ≤ 10^{6}) — the number of flowers in each of the initial bouquets.

Output

Print the maximum number of large bouquets Vasya can make.

Examples

Input

5

2 3 4 2 7

Output

2

Input

6

2 2 6 8 6 12

Output

0

Input

3

11 4 10

Output

1

Note

In the first example Vasya can make 2 large bouquets. For example, the first bouquet can contain the first and the fifth initial bouquets (the total number of flowers is then equal to 9), and the second bouquet can consist of the second and the third initial bouquets (the total number of flowers is then equal to 7). The fourth initial bouquet is unused in this scheme.

In the second example it is not possible to form a single bouquet with odd number of flowers.

In the third example Vasya can make one large bouquet. For example, he can make it using all three initial bouquets. The size of the large bouquet is then equal to 11 + 4 + 10 = 25.

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Mar/26/2019 22:38:34 (f2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|