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

void even(int arr[1024], int n){//72051

	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;
    int arr[1024]; //= {7, 2, 0, 5, 1};
	scanf("%d", &n);

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

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

	}

	//n = 5;

	even(arr, n);

}
