#include<iostream>
#include<cmath>
using namespace  std;
int main ()
{
    int n, sum=1, broqch=0;
    cin>>n;
    int massiv [n];
    for (int i=0; i<n; i++)
    {
        cin>>massiv[i];
    }
    for (int i=1; i<=n; i++)
    {
        if (massiv[i]%2==0)
        {
            sum=sum+n-i+i-1;
            broqch++;
        }
    }
    cout<<sum-broqch+1;
    return 0;
}
