#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++){
        for(unsigned short int a=0;a<i+2;a++){
            if(pro%2==0){
                br++;
            }
            pro=1;
            for(unsigned short int b=a;b<i+1;b++){
                pro*=numbers[b];
            }
        }
    }

    cout<<endl<<br;
    return 0;
}
