
#include <iostream>
using namespace std;

int main()
{
    int result = 1;

    int n;
    cin >> n;

    int arr[n];
    for(int i =0; i<n;i++)
    {
        cin >> arr[i];
    }
    int res=1;
    for(int i = 0;i<n;i++)
    {
        res=arr[i];
        if(arr[i]%2==0)
            result++;
        for(int j =0; j<n;j++)
        {
            res*=arr[j];
            if(res%2==0)
                result++;
            else
                break;
        }
    }
    cout << result<<endl;

    return 0;
}
