import java.util.*;

public class Main{
  public static void main(String[] args){
   Scanner sc = new Scanner(System.in);

   int n = sc.nextInt();
   long ans = 1;
   long[] array = new long[n];
   boolean flag = false;
   boolean flag_z = false;

   for(int i=0; i<n; i++){
     long num = sc.nextLong();
     if(num==0){
       flag_z = true;
     }
     ans *= num;
     if(ans<=0||ans>1000000000000000000L){
       flag = true;
     }

     //System.out.println("ans:"+ans);
   }

   if(flag_z){
    System.out.println(0);
  }else{
    if(flag){
      System.out.println("-1");
    }else{
      System.out.println(ans);
    }
  }



   // System.out.println(900000000000000000L*900000000000000000L);
   //
   // String bin = Long.toBinaryString(1000000000000000000L);
   // System.out.println(bin);
   // System.out.println(bin.length());

   // for(long i=1000000000000000000L; i>1e17; i--){
   //   System.out.println(i*1000000000000000000L);
   //   if(i*1000000000000000000L<1000000000000000000L&&i*1000000000000000000L>0){
   //     System.out.println("i"+i);
   //     break;
   //   }
   // }
   //999999999999999988
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
   Scanner sc = new Scanner(System.in);

   int n = sc.nextInt();
   long ans = 1;
   long[] array = new long[n];
   boolean flag = false;
   boolean flag_z = false;

   for(int i=0; i<n; i++){
     long num = sc.nextLong();
     if(num==0){
       flag_z = true;
     }
     ans *= num;
     if(ans<=0||ans>1000000000000000000L){
       flag = true;
     }

     //System.out.println("ans:"+ans);
   }

   if(flag_z){
    System.out.println(0);
  }else{
    if(flag){
      System.out.println("-1");
    }else{
      System.out.println(ans);
    }
  }



   // System.out.println(900000000000000000L*900000000000000000L);
   //
   // String bin = Long.toBinaryString(1000000000000000000L);
   // System.out.println(bin);
   // System.out.println(bin.length());

   // for(long i=1000000000000000000L; i>1e17; i--){
   //   System.out.println(i*1000000000000000000L);
   //   if(i*1000000000000000000L<1000000000000000000L&&i*1000000000000000000L>0){
   //     System.out.println("i"+i);
   //     break;
   //   }
   // }
   //999999999999999988
  }
} Main public static void main(String[] args){
   Scanner sc = new Scanner(System.in);

   int n = sc.nextInt();
   long ans = 1;
   long[] array = new long[n];
   boolean flag = false;
   boolean flag_z = false;

   for(int i=0; i<n; i++){
     long num = sc.nextLong();
     if(num==0){
       flag_z = true;
     }
     ans *= num;
     if(ans<=0||ans>1000000000000000000L){
       flag = true;
     }

     //System.out.println("ans:"+ans);
   }

   if(flag_z){
    System.out.println(0);
  }else{
    if(flag){
      System.out.println("-1");
    }else{
      System.out.println(ans);
    }
  }



   // System.out.println(900000000000000000L*900000000000000000L);
   //
   // String bin = Long.toBinaryString(1000000000000000000L);
   // System.out.println(bin);
   // System.out.println(bin.length());

   // for(long i=1000000000000000000L; i>1e17; i--){
   //   System.out.println(i*1000000000000000000L);
   //   if(i*1000000000000000000L<1000000000000000000L&&i*1000000000000000000L>0){
   //     System.out.println("i"+i);
   //     break;
   //   }
   // }
   //999999999999999988
  } main {
   Scanner sc = new Scanner(System.in);

   int n = sc.nextInt();
   long ans = 1;
   long[] array = new long[n];
   boolean flag = false;
   boolean flag_z = false;

   for(int i=0; i<n; i++){
     long num = sc.nextLong();
     if(num==0){
       flag_z = true;
     }
     ans *= num;
     if(ans<=0||ans>1000000000000000000L){
       flag = true;
     }

     //System.out.println("ans:"+ans);
   }

   if(flag_z){
    System.out.println(0);
  }else{
    if(flag){
      System.out.println("-1");
    }else{
      System.out.println(ans);
    }
  }



   // System.out.println(900000000000000000L*900000000000000000L);
   //
   // String bin = Long.toBinaryString(1000000000000000000L);
   // System.out.println(bin);
   // System.out.println(bin.length());

   // for(long i=1000000000000000000L; i>1e17; i--){
   //   System.out.println(i*1000000000000000000L);
   //   if(i*1000000000000000000L<1000000000000000000L&&i*1000000000000000000L>0){
   //     System.out.println("i"+i);
   //     break;
   //   }
   // }
   //999999999999999988
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc long ans = 1; ans 1 long[] array = new long[n]; array new long[n] n boolean flag = false; flag false boolean flag_z = false; flag_z false for(int i=0; i<n; i++){
     long num = sc.nextLong();
     if(num==0){
       flag_z = true;
     }
     ans *= num;
     if(ans<=0||ans>1000000000000000000L){
       flag = true;
     }

     //System.out.println("ans:"+ans);
   } int i=0; int i=0; i 0 i<n i n i++ i++ i {
     long num = sc.nextLong();
     if(num==0){
       flag_z = true;
     }
     ans *= num;
     if(ans<=0||ans>1000000000000000000L){
       flag = true;
     }

     //System.out.println("ans:"+ans);
   } {
     long num = sc.nextLong();
     if(num==0){
       flag_z = true;
     }
     ans *= num;
     if(ans<=0||ans>1000000000000000000L){
       flag = true;
     }

     //System.out.println("ans:"+ans);
   } long num = sc.nextLong(); num sc.nextLong() sc.nextLong sc if(num==0){
       flag_z = true;
     } num==0 num 0 {
       flag_z = true;
     } flag_z = true flag_z true ans *= num ans num if(ans<=0||ans>1000000000000000000L){
       flag = true;
     } ans<=0||ans>1000000000000000000L ans<=0 ans 0 ans>1000000000000000000L ans 1000000000000000000L {
       flag = true;
     } flag = true flag true if(flag_z){
    System.out.println(0);
  }else{
    if(flag){
      System.out.println("-1");
    }else{
      System.out.println(ans);
    }
  } flag_z {
    System.out.println(0);
  } System.out.println(0) System.out.println System.out System System.out 0 {
    if(flag){
      System.out.println("-1");
    }else{
      System.out.println(ans);
    }
  } if(flag){
      System.out.println("-1");
    }else{
      System.out.println(ans);
    } flag {
      System.out.println("-1");
    } System.out.println("-1") System.out.println System.out System System.out "-1" {
      System.out.println(ans);
    } System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
  public static void main(String[] args){
   Scanner sc = new Scanner(System.in);

   int n = sc.nextInt();
   long ans = 1;
   long[] array = new long[n];
   boolean flag = false;
   boolean flag_z = false;

   for(int i=0; i<n; i++){
     long num = sc.nextLong();
     if(num==0){
       flag_z = true;
     }
     ans *= num;
     if(ans<=0||ans>1000000000000000000L){
       flag = true;
     }

     //System.out.println("ans:"+ans);
   }

   if(flag_z){
    System.out.println(0);
  }else{
    if(flag){
      System.out.println("-1");
    }else{
      System.out.println(ans);
    }
  }



   // System.out.println(900000000000000000L*900000000000000000L);
   //
   // String bin = Long.toBinaryString(1000000000000000000L);
   // System.out.println(bin);
   // System.out.println(bin.length());

   // for(long i=1000000000000000000L; i>1e17; i--){
   //   System.out.println(i*1000000000000000000L);
   //   if(i*1000000000000000000L<1000000000000000000L&&i*1000000000000000000L>0){
   //     System.out.println("i"+i);
   //     break;
   //   }
   // }
   //999999999999999988
  }
} public class Main{
  public static void main(String[] args){
   Scanner sc = new Scanner(System.in);

   int n = sc.nextInt();
   long ans = 1;
   long[] array = new long[n];
   boolean flag = false;
   boolean flag_z = false;

   for(int i=0; i<n; i++){
     long num = sc.nextLong();
     if(num==0){
       flag_z = true;
     }
     ans *= num;
     if(ans<=0||ans>1000000000000000000L){
       flag = true;
     }

     //System.out.println("ans:"+ans);
   }

   if(flag_z){
    System.out.println(0);
  }else{
    if(flag){
      System.out.println("-1");
    }else{
      System.out.println(ans);
    }
  }



   // System.out.println(900000000000000000L*900000000000000000L);
   //
   // String bin = Long.toBinaryString(1000000000000000000L);
   // System.out.println(bin);
   // System.out.println(bin.length());

   // for(long i=1000000000000000000L; i>1e17; i--){
   //   System.out.println(i*1000000000000000000L);
   //   if(i*1000000000000000000L<1000000000000000000L&&i*1000000000000000000L>0){
   //     System.out.println("i"+i);
   //     break;
   //   }
   // }
   //999999999999999988
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[] args){
   Scanner sc = new Scanner(System.in);

   int n = sc.nextInt();
   long ans = 1;
   long[] array = new long[n];
   boolean flag = false;
   boolean flag_z = false;

   for(int i=0; i<n; i++){
     long num = sc.nextLong();
     if(num==0){
       flag_z = true;
     }
     ans *= num;
     if(ans<=0||ans>1000000000000000000L){
       flag = true;
     }

     //System.out.println("ans:"+ans);
   }

   if(flag_z){
    System.out.println(0);
  }else{
    if(flag){
      System.out.println("-1");
    }else{
      System.out.println(ans);
    }
  }



   // System.out.println(900000000000000000L*900000000000000000L);
   //
   // String bin = Long.toBinaryString(1000000000000000000L);
   // System.out.println(bin);
   // System.out.println(bin.length());

   // for(long i=1000000000000000000L; i>1e17; i--){
   //   System.out.println(i*1000000000000000000L);
   //   if(i*1000000000000000000L<1000000000000000000L&&i*1000000000000000000L>0){
   //     System.out.println("i"+i);
   //     break;
   //   }
   // }
   //999999999999999988
  }
}