
int main(void)
{char buf[100];
    int n;
    int m;
    int multi = 1;

    fgets(buf, sizeof(buf), stdin);
    sscanf(buf, "%d", &n);
    for (int i = 0; i < n; i++) {
        fgets(buf, sizeof(buf), stdin);
        sscanf(buf, "%d", &m);
        int num[i]= m;
        multi*=num[i];
    }
    if (multi<1000000000000000000){
    printf("%d",multi);
        
    }
    else if (multi>=1000000000000000000){
    printf("-1");}
    
    
        
    }
    