#include<iostream>
using namespace std;
int main(){
    unsigned short int N;
    cin>>N;
    unsigned short int numbers[N];
    long long pro=1,br=0;
    for(unsigned short int i=0;i<N;i++){
        cin>>numbers[i];
    }
    for(unsigned short int i=0;i<N;i++){
        pro=1;
       for(unsigned short int a=0;a<i+1;a++){
            pro*=numbers[a];
            if(pro%2==0){
                br++;
            }
       }
    }
    cout<<br*2;
    return 0;
}