#include <stdio.h>

int main()
{
    int n;
    long long count = 0;
    scanf("%i", &n);
    int arr[n];
    for (int i = 0; i < n; i++)
    {
        scanf("%i", &arr[i]);
       if (arr[i] % 2 == 0)
            count++;
    }

    int last = 0;

    for (int i = 0; i < n; i++)
    {
        last = arr[i];
        for (int j = i + 1; j < n; j++)
        {
            last *= arr[j];
            if(last % 2 == 0)
            {
                count++;
                //printf("%d\n", last);
            }
        }
    }
    printf("%i", count);

    return 0;
}

