#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int main()
{
    vector<int> v;
    int n, ans = 0, beg = 0, end = 0;
    int curr_mult = 1;

    cin >> n;

    for (int i = 0; i < n; i++)
    {
        int x;
        cin >> x;
        v.push_back(x);
    }

    for (int i = 0; i < n - 1; i++)
    {
        for (int j = i; j < n; j++)
        {
            curr_mult *= (v[j] % 2);
            if (curr_mult == 0) ans++;
        }
        curr_mult = 1;
    }

    cout << ans << endl;
    return 0;
}
