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

void even(int arr[32], int n){

	int buffer;
	int count = 0;

	for(int i = 0; i < n; i++){

		buffer = arr[i];

		for(int j = i + 1; j < n; j++){

			buffer = buffer*arr[j];

			if(arr[i] % 2 == 0 && arr[i] != 0){

				count++;

			}

			if(arr[i] == 0 || arr[j] == 0){
				break;
			}

			if(buffer % 2 == 0){

				count++;

			}

		}

	}

	printf("%d", count);

}

int main()
{

    int n; //= 5;
    int arr[32]; //= {777, 231, 0, 550, 123};

	scanf("%d", &n);

	for(int i = 0; i < n; i++){

		scanf("%d", &arr[i]);

	}

	even(arr, n);

}
