#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
int prod = 1;
while(n != 0)
if( (n % 10) % 2 == 0)
prod *= n % 10;
n /= 10;
}
cout << (prod == 1 ? -1 : prod);
return 0;
#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
int prod = 1;
while(n != 0)
{
if( (n % 10) % 2 == 0)
prod *= n % 10;
n /= 10;
}
cout << (prod == 1 ? -1 : prod);
return 0;
}