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 ai (1 ≤ ai ≤ 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.
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.Arrays;
import java.util.BitSet;
import java.util.InputMismatchException;
import java.math.BigInteger;

/**
 *
 * @author Pradyumn Agrawal coderbond007
 */
public class Hackerrank {
    public static InputStream inputStream = System.in;
    public static OutputStream outputStream = System.out;
    public static FastReader in = new FastReader(inputStream);
    public static PrintWriter out = new PrintWriter(outputStream);
    /*static double[][] A;

    static double[] b;

    static double[] c;

    static double[] res;

    static int[] kt = new int[0];

    static int[] N;

    static int m;

    static double EPS = 1e-10;

    static double INF = Double.MAX_VALUE;*/
    public static void main(String[] args) throws java.lang.Exception {
        new Hackerrank().run();
        out.close();
    }

    void run() throws java.lang.Exception
    {
        int n = ni();
        int[] a = na(n);
        int even=0,odd=0;
        for(int i=0;i<n;i++) {
            if(a[i]%2 == 0) even++;
            else odd++;
        }
        if(even == 0){
            if(odd%2 == 0) {
                out.print(0);
            } else {
                out.print(odd);
            }
        } else if( odd == 0) {
            out.print(even);
        } else if( odd%2 == 1) {
            out.print(odd);
        } else {
            out.print(even);
        }
    }
    /*void run() throws java.lang.Exception {
        int n = ni();
        int m = ni();
        A = new double[n][m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                A[i][j] = ni();
            }
        }
        b = new double[n];
        for (int i = 0; i < n; i++) {
            b[i] = ni();
        }
        c = new double[m];
        for (int i = 0; i < m; i++) {
            c[i] = ni();
        }
        double[] ansx = new double[m];
        int anst = solveDietProblem(n, m, A, b, c, ansx);
        if (anst == -1) {
            out.printf("No solution\n");
            return;
        }
        if (anst == 0) {
            out.printf("Bounded solution\n");
            for (int i = 0; i < m; i++) {
                out.printf("%.18f%c", ansx[i], i + 1 == m ? '\n' : ' ');
            }
            return;
        }
        if (anst == 1) {
            out.printf("Infinity\n");
            return;
        }
    }

    static void pivot(int k, int l, int e) {
        int x = kt[l];
        double p = A[l][e];
        for (int i = 0; i < k; i++)
            A[l][i] /= p;
        b[l] /= p;
        N[e] = 0;
        for (int i = 0; i < m; i++)
            if (i != l) {
                b[i] -= A[i][e] * b[l];
                A[i][x] = A[i][e] * -A[l][x];
            }
        for (int j = 0; j < k; j++)
            if (N[j] != 0) {
                c[j] -= c[e] * A[l][j];
                for (int i = 0; i < m; i++)
                    if (i != l)
                        A[i][j] -= A[i][e] * A[l][j];
            }
        kt[l] = e;
        N[x] = 1;
        c[x] = c[e] * -A[l][x];
    }

    static double[] resize(double[] src, int size, double dft) {
        double[] res = new double[size];
        Arrays.fill(res, dft);
        for (int i = 0; i < Math.min(src.length, size); i++)
            res[i] = src[i];
        return res;
    }

    static double[] resize(double[] src, int size) {
        return resize(src, size, 0);
    }

    static int[] resize(int[] src, int size, int dft) {
        int[] res = new int[size];
        Arrays.fill(res, dft);
        for (int i = 0; i < Math.min(src.length, size); i++)
            res[i] = src[i];
        return res;
    }

    static int[] resize(int[] src, int size) {
        return resize(src, size, 0);
    }

    static double[] doit(int k) {
        double[] res = new double[0];
        double best = 0;
        while (true) {
            int e = -1, l = -1;
            for (int i = 0; i < k; i++)
                if (N[i] != 0 && c[i] > EPS) {
                    e = i;
                    break;
                }
            if (e == -1)
                break;
            for (int i = 0; i < m; i++)
                if (A[i][e] > EPS && (l == -1 || best > b[i] / A[i][e]))
                    best = b[l = i] / A[i][e];
            if (l == -1)
                return new double[0];
            pivot(k, l, e);
        }
        res = resize(res, k, 0);
        for (int i = 0; i < m; i++)
            res[kt[i]] = b[i];
        return res;
    }

    static double[] simplex(double[][] AA, double[] bb, double[] cc) {
        int n = AA[0].length, k;
        m = AA.length;
        k = n + m + 1;
        kt = resize(kt, m);
        b = bb;
        c = cc;
        c = resize(c, n + m);
        A = AA;
        for (int i = 0; i < m; i++) {
            A[i] = resize(A[i], k);
            A[i][n + i] = 1;
            A[i][k - 1] = -1;
            kt[i] = n + i;
        }
        N = new int[k];
        Arrays.fill(N, 1);
        for (int i = 0; i < m; i++)
            N[kt[i]] = 0;
        int pos = 0;
        double min_element = INF;
        for (int i = 0; i < b.length; i++) {
            if (b[i] < min_element) {
                min_element = b[i];
                pos = i;
            }
        }
        if (b[pos] < -EPS) {
            c = new double[k];
            c[k - 1] = -1;
            pivot(k, pos, k - 1);
            res = doit(k);
            if (res[k - 1] > EPS)
                return new double[0];
            for (int i = 0; i < m; i++)
                if (kt[i] == k - 1)
                    for (int j = 0; j < k - 1; j++)
                        if (N[j] != 0 && (A[i][j] < -EPS || EPS < A[i][j])) {
                            pivot(k, i, j);
                            break;
                        }
            c = cc;
            c = resize(c, k, 0);
            for (int i = 0; i < m; i++)
                for (int j = 0; j < k; j++)
                    if (N[j] != 0)
                        c[j] -= c[kt[i]] * A[i][j];
        }
        res = doit(k - 1);
        if (!(res.length == 0))
            res = resize(res, n);
        return res;
    }*/
    private static int ni(){
        return in.nextInt();
    }
    private static long nl(){
        return in.nextLong();
    }
    private static String ns(){
        return in.nextLine();
    }
    private static char nc(){
        return in.nextCharacter();
    }
    private static double nd(){
        return in.nextDouble();
    }

    private static char[] ns(int n)
    {
        char[] a = new char[n];
        for(int i=0;i<n;i++) a[i] = nc();
        return a;
    }

    private static char[][] nm(int n, int m)
    {
        char[][] map = new char[n][];
        for(int i=0;i<n;i++) map[i] = ns(m);
        return map;
    }

    private static int[] na(int n)
    {
        int[] a = new int[n];
        for(int i=0;i<n;i++) a[i] = ni();
        return a;
    }

    private static long[] nal(int n)
    {
        long[] a = new long[n];
        for(int i=0;i<n;i++) a[i] = nl();
        return a;
    }
}

class FastReader{
    private boolean finished = false;

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public FastReader(InputStream stream){
        this.stream = stream;
    }

    public int read(){
        if (numChars == -1){
            throw new InputMismatchException ();
        }
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read (buf);
            } catch (IOException e){
                throw new InputMismatchException ();
            }
            if (numChars <= 0){
                return -1;
            }
        }
        return buf[curChar++];
    }

    public int peek(){
        if (numChars == -1){
            return -1;
        }
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read (buf);
            } catch (IOException e){
                return -1;
            }
            if (numChars <= 0){
                return -1;
            }
        }
        return buf[curChar];
    }

    public int nextInt(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        int res = 0;
        do{
            if(c==','){
                c = read();
            }
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        } while (!isSpaceChar (c));
        return res * sgn;
    }

    public long nextLong(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        long res = 0;
        do{
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        } while (!isSpaceChar (c));
        return res * sgn;
    }

    public String nextString(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        StringBuilder res = new StringBuilder ();
        do{
            res.appendCodePoint (c);
            c = read ();
        } while (!isSpaceChar (c));
        return res.toString ();
    }

    public boolean isSpaceChar(int c){
        if (filter != null){
            return filter.isSpaceChar (c);
        }
        return isWhitespace (c);
    }

    public static boolean isWhitespace(int c){
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private String readLine0(){
        StringBuilder buf = new StringBuilder ();
        int c = read ();
        while (c != '\n' && c != -1){
            if (c != '\r'){
                buf.appendCodePoint (c);
            }
            c = read ();
        }
        return buf.toString ();
    }

    public String nextLine(){
        String s = readLine0 ();
        while (s.trim ().length () == 0)
            s = readLine0 ();
        return s;
    }

    public String nextLine(boolean ignoreEmptyLines){
        if (ignoreEmptyLines){
            return nextLine ();
        }else{
            return readLine0 ();
        }
    }

    public BigInteger nextBigInteger(){
        try{
            return new BigInteger (nextString());
        } catch (NumberFormatException e){
            throw new InputMismatchException ();
        }
    }

    public char nextCharacter(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        return (char) c;
    }

    public double nextDouble(){
        int c = read ();
        while (isSpaceChar (c))
            c = read ();
        int sgn = 1;
        if (c == '-'){
            sgn = -1;
            c = read ();
        }
        double res = 0;
        while (!isSpaceChar (c) && c != '.'){
            if (c == 'e' || c == 'E'){
                return res * Math.pow (10, nextInt ());
            }
            if (c < '0' || c > '9'){
                throw new InputMismatchException ();
            }
            res *= 10;
            res += c - '0';
            c = read ();
        }
        if (c == '.'){
            c = read ();
            double m = 1;
            while (!isSpaceChar (c)){
                if (c == 'e' || c == 'E'){
                    return res * Math.pow (10, nextInt ());
                }
                if (c < '0' || c > '9'){
                    throw new InputMismatchException ();
                }
                m /= 10;
                res += (c - '0') * m;
                c = read ();
            }
        }
        return res * sgn;
    }

    public boolean isExhausted(){
        int value;
        while (isSpaceChar (value = peek ()) && value != -1)
            read ();
        return value == -1;
    }

    public String next(){
        return nextString();
    }

    public SpaceCharFilter getFilter(){
        return filter;
    }

    public void setFilter(SpaceCharFilter filter){
        this.filter = filter;
    }

    public interface SpaceCharFilter{
        public boolean isSpaceChar(int ch);
    }
}