#include <iostream>
using namespace std;
int sumCif(int n)
{
int s = 0;
while (n != 0)
{
int c = n % 10;
s += c;
n /= 10;
}
return s;
}
int main()
{
int n, p = 1;
cin >> n;
int a[n];
for (int i = 1; i <= n; i++)
{
cin >> a[i];
if (sumCif(a[i]) % 2 == 1)
{
p *= a[i];
}
}
cout << p;
return 0;
}