#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <vector>

#define ll long long

int main(){
	int n;
	scanf("%d", &n);
	int input[n];
	for(int i = 0; i < n; i++) scanf("%d", input + i);
	//std::vector<int> mult[n];
	int result = 0;
	//for(int i = 0; i < n; i++) mult[i] = std::vector<int>(n, 0);
	/*
	for(int i = 0; i < n; i++){
		mult[i][1] = input[i];
        for(int j = 1; j <= i; j++){
			mult[i][j] *= input[i];
			if(mult[i][j] % 2 == 0) result++;
        }
	}
	*/
	for(int i = 0; i < n - 1; i++){
		int current = input[i];
		if(current % 2 == 0) result++;
        for(int j = i + 1; j < n; j++){
			current *= input[j];
			if(current % 2 == 0) result++;
        }
	}
	printf("%d", result);
	//system("pause");
	return 0;
}
