#include
#include
using namespace std;
int main()
{
int n, k;
cin >> n;
vector a(n);
vector b;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 0; i < n; i++) {
if (a[i] % 2 != 0) {
b.push_back(a[i]);
}
for (int i = 1; i < b.size() - 1; i++)
k *= b[i];
}
cout << k;</p>
return 0;
}