A 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.

Difficulty: interview

Starter code:

Solutions:


n = int(input())
a = 0
b = 0
for x in input().split():
    x = int(x)
    if x % 2 == 0:
        a += 1
    else:
        b += 1
res = b
if a < b:
    res = a + (b-a)//3
print(res)


n = int(input())
f = list(map(int, input().split()))

cnt1 = 0
cnt2 = 0

for i in range(n):
    if (f[i]%2!=0):
        cnt1+=1
    else:
        cnt2+=1

if (cnt1 <= cnt2):
    print(cnt1)
else:
    print(cnt2 + (cnt1-cnt2)//3)


n = int(input())
a = list(map(int, input().split()))
b = 0
c = 0
for i in a:
    if i % 2 == 0:
        b += 1
    else:
        c += 1
d = min(b, c)
b -= d
c -= d
if c <= 0:
    print(d)
else:
    f=c//3
    d+=f
    print(d)

n = int(input())
s = list(map(int, input().split()))

oddd = 0
evend = 0

for i in range(n):
 if s[i] % 2 == 0:
  oddd += 1
 else:
  evend += 1
if evend == 0:
 print(0)
else:
 if oddd == 0:
  print(evend // 3)
 else:
  if oddd < evend:
   print(oddd + (evend - oddd) // 3)
  else:
   print(evend)

import sys

num = int(sys.stdin.readline())
fl = list(map(int, sys.stdin.readline().split()))

odd = 0
even = 0

for f in fl:
    if (f % 2):
        odd += 1
    else:
        even += 1

res = min(even, odd)
odd -= even
if (odd > 0):
    res += odd // 3

print(res)


n  = int(input())
mas = map(int, input().split())

odd = 0
even = 0
for i in mas:
    if i%2 == 0:
        even = even+1
    else:
        odd =  odd+1

ans = min(odd, even)
odd = odd - ans
ans+= int(odd/3)
print(ans)

def min(a, b):
    if a >= b:
        return b
    else:
        return a

b = 0
n = int(input())
a = input().split()
for i in range(len(a)):
    a[i] = int(a[i])
for i in range(n):
    if a[i] % 2 == 0:
        b += 1
c = n - b
ans = min(b, c)
if b < c:
    ans += ((c - b) // 3)
print(ans)


n = int(input())
arr = (map(int, input().split()))
res = 0
for x in arr:
    res = res + x % 2
    
finalres = min(n - res, res)
res = res - finalres
finalres = finalres + res // 3
print(finalres)

n = int(input())
a = [int(x) for x in input().split()]
x = 0 
for i in range(0, n):
	if a[i] % 2==1:
		x = x + 1
cnt = n - x
if cnt > x: 
	cnt=x
x = x - (n - x)
if x > 0:
	cnt += int(x / 3)
print (cnt)

n = int(input())
flowers = input().split()
odd = 0
ott = 0
for val in flowers:
    if int(val) % 2 == 0:
        odd += 1
    else:
        ott += 1

while ott > odd + 2:
    ott -= 2
    odd += 1
    
print(min(odd, ott))


n = int(input())
a = list(map(int, input().split()))

q = [0] * 2

for i in range(n):
    q[a[i] % 2] += 1

x = min(q[0], q[1])

q[0] -= x
q[1] -= x

print(x + q[1] // 3)


n = int(input())
s = input().split(" ")
a = 0
b = 0
for i in s:
	if (int(i)%2 == 1):
		a+=1
	else:
		b+=1
if a < b:
	print(a)
else:
	print(b+(a-b)//3)

# import sys
#
# ans = []
# for line in sys.stdin:
#     temp = line.split('\t')
#     tmp = temp[0][:7] + '.'*(80 - len(temp[-1]) - 7) + temp[-1].strip('\n')
#     ans.append(tmp)
# print('\n'.join(ans))

n = int(input())
a = list(map(int, input().split()))
odd = 0
even = 0
for i in a:
    if i % 2 != 0:
        odd += 1
    else:
        even += 1
if odd <= even:
    print(min(odd, even))
else:
    diff = odd - even
    print(min(odd, even) + diff // 3)


s=0;
q=0;
n = int(input());
qq=0;
w = str(input());
w1=w.split()

while qq<n:
    qwe=int(w1[qq]);
    if (qwe%2==0):
        s=s+1;
    else:
        q=q+1
    qq = qq + 1;

if q<=s:
    print(q);
else:
    print(s+(q-s)//3)

N = input()

B = [int(i) for i in input().split()]

a, b = 0, 0

for i in B:
	if i % 2 == 0:
		b = b + 1
	else:
		a = a + 1


if a <= b:
	print(a)
else:
	a = a - b
	print(b + a//3)

from math import *
n = int(input())
c=0;
nc=0;
k = input().split(" ")
for i in range(n):
    if (int(k[i]) % 2 == 0):
        c = c + 1
    else:
        nc = nc + 1
tt = min(c, nc) + max(0, nc - min(c, nc))//3
print(tt)


n = int(input())

f = input().split(" ")

a = 0
b = 0
for i in range(0,  n):
    g = int(f[i])
    if( g % 2 == 0): 
        a += 1
    else:
        b += 1
        
if(a > b):
    print(b)
else:
    print(a + (b-a)//3)

n = map(int, input().split())
a = sorted(list(map(int, input().split())))

t2 = 0
t1 = 0
for it in a:
    if (it % 2 == 0):
        t2 = t2 + 1
    else:
        t1 = t1 + 1
        
ans = min(t1, t2)

t1 -= ans

ans += int(t1) // 3

print(ans)

cntn=0;
cntc=0;
n=int(input())
s=input().split(" ")
for i in s:
    if (int(i)%2==0):
        cntn=cntn+1;
    else:
        cntc=cntc+1
k= min(cntc,cntn)
if cntc>cntn:
    k=max(k, cntn+(cntc-cntn)//3 )
print (k)

n=int (input())
a = list(map(int, input().split()))
k=0
d=0
for i in range(n):
    if a[i]%2==1:
        k+=1
    else:
        d+=1
    if k<d:
        ma=k
    else:
        ma=d
while (k>2):
    k-=2
    d+=1
    if (k<d):
        if k>ma:
            ma=k
    else:
        if d>ma:
            ma=d
print(ma)

n = int(input())
m = list(map(int, input().split()))

c = 0

for i in m:
    if i % 2:
        c += 1

uc = n - c

if c <= uc:
    print(c)
    return

b = (c-uc) // 3
c -= b * 3


print(b + min(uc, c))


n = int(input())
mas = list(map(int, input().split()))
r1 = [i for i in mas if i % 2 == 0]
r2 = [i for i in mas if i % 2 != 0]
r1 = len(r1)
r2 = len(r2)
if min(r1, r2) == r2:
    k = r2
else:
    k = r1 + ( (r2 - r1) //3)
print(k)

n = u = o = 0
cnt=0
n = int(input())
i = 0
x = input()
x=x+'                     ';
while (cnt<n):
    if(x[i] is ' '):
        i+=1;
        continue
    else:
        a = int(x[i])
        if (x[i+1]is' '):
            if(a%2==0):
                u+=1
            else:
                o+=1
            cnt+=1
    i+=1
ans = min(u,o)
u-=ans
o-=ans
ans+=int(o/3)
print(ans)


n = int(input())
l = 0
k = 0
arr = list(map(int,input().split()))

for i in range(0,n) :
  if arr[i] % 2 == 0 :
    l = l + 1
  if arr[i] % 2 == 1 :
    k = k + 1

if l>k : 
    print(k)
else : 
    print(l+(k-l)//3)