#include<iostream>
using namespace std;
int main(){
    int n, sub_rows = 0;
    cin >> n;
    int num[n];
    for(int i = 0; i < n; i++){
        cin >> num[i];
    }
    for(int i = 0; i < n; i++){
        /*if(num[i] % 2 == 0){
            cout << num[i] << endl;
            sub_rows ++;
        }*/
        int pr = num[i];
        for(int j = i; j < n; j++){
            pr *= num[j];
            if(pr % 2 == 0){
                //cout << pr / num[j] / num[i] << " x " << num[j] << " = " << pr / num[i] << endl;
                sub_rows ++;
            }
        }
    }
    cout << sub_rows;
    return 0;
}
