#include<stdio.h>
signed main(){
int i,b=0,answer=1;

int a[b];

scanf("%d",&b);


for(i=1;i<=b;i++){
scanf("%d",&a[i]);
answer*=a[i];
}
if(answer>10000000000000000000){
printf("error\n");
}else{
printf("%d\n",answer);
}
return(0);
}