#include <fstream>
#include <cstdio>

using namespace std;

int main()
{
    ifstream in("versus.in");
    ofstream out("versus.out");
    int n;
    in >> n;
    int o = 0, e = 0;
    for (int i = 0; i < n; i++)
    {
        int x;
        in >> x;
        if (x & 1) o++; else e++;
    }
    out << o * e;
}