#include <iostream>
#include <stdio.h>
#include <vector>
#include <stdlib.h>
#define SZ 1000000
using namespace std;
typedef struct{
    long long topki;
    long long teglo;
    long long last_added_weight[SZ];
    long long counter;
}snowman;
typedef struct{
    int x;
    int y;
}point;
long long count_weight(){
    long long n;
    long long sum=0;
    cin >> n;
    long long p=0,m=0;
    snowman a[n+1];

    a[0].topki = 0;
    a[0].teglo=0;

    for(int i = 1;i<=n;i++){
        long long lastp = p;
        long long lastm = m;
        cin >> p>>m;
        a[i].counter=0;
        if(m>0){
            if(p==i-1){
                a[i].topki = p+1;
                a[i].teglo=a[i-1].teglo+m;
                a[i].last_added_weight[a[i].counter++] = m;
            }else{
                a[i].topki = a[p].topki+1;
                a[i].teglo = a[p].teglo+m;
                a[i].last_added_weight[a[i].counter++] = m;
            }

        }else if(m==0){
            if(p==i-1){
                a[i].topki = p-1;
                a[i].teglo=a[i-1].teglo-lastm;
            }else{
                a[i].topki = a[p].topki-1;
                a[i].teglo=a[p].teglo-a[p].last_added_weight[a[i].counter--];

            }

        }
    }
    for(int i = 1;i<=n;i++){
        if(a[i].topki!=0){
            sum+=a[i].teglo;
        }
    }
    return sum;
}
long long even(){
    long long n;
    cin >>n;
    long long a[n];
    long long ins;
    for(long long i=0;i<n;i++){
        cin>>ins;
        a[i]=ins;
    }
    long long calc=0;
    long long sum=0;
    for(long long i=0;i<n;i++){
            if(a[i]%2==0){
                sum++;
            }
            calc=a[i];
        for(long long j=i+1;j<n;j++){
                calc*=a[j];

            if(calc%2==0){
                sum++;
            }

        }
        calc = 0;
    }
    return sum;

}
long long points(){
    long long n,x,y,sum=0;
    cin >>n;
    point a[n];
    for(int i=0; i<n;i++){
        cin>>x>>y;
        a[i].x = x;
        a[i].y = y;
    }
    for(int i=0;i<n-1;i++){
        for(int j=i+1;j<n;j++){
                long long xmult = (a[i].x-a[j].x)*(a[i].x-a[j].x);
                long long ymult = (a[i].y-a[j].y)*(a[i].y-a[j].y);
                sum+=xmult+ymult;
            }
        }
    return sum;
    }
int main(){
    cout<<even()<<endl;
    return 0;
}
