#include<bits/stdc++.h>
using namespace std;
const long double mx = 1e18;
int main()
{
cout.precision(0);
 long double s=1;
 int n,f=0;
 cin>>n;
 for(int i=1;i<=n;i++)
 {
    long double k;
     cin>>k;
     s*=k;
     if(k==(long double)0)f=1;
 }
 if(s>mx)cout<<-1<<endl;
  else if(f==1)cout<<0<<endl;
 else cout<<fixed<<s<<endl;
}
