import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
import java.util.Arrays;

public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final int n = sc.nextInt();
    final List<Long> list = new ArrayList<>();

    long max = 1000000000000000000L;
    long count = 1;
    
    for(int i = 0; i < n ; i++){
        list.add(sc.nextLong());
        if(list.get(i) == 0){
            System.out.println(0);
            System.exit(0);
        }
    }

    for(int i = 0; i < n ; i++){
        max /= list.get(i);
        //System.out.println(max);
    }


    if(max < 1){
        System.out.println(-1);
    }else{
        for(int i = 0 ; i < n ; i++){
            count *= list.get(i);
        }
        System.out.println(count);
    }


    









    

    



    
  

    


    


    

    
    
    



    





}
} import java.io.BufferedReader; BufferedReader java.io import java.io.*; io.* java import java.util.*; util.* java import java.util.ArrayList; ArrayList java.util import java.util.Iterator; Iterator java.util import java.util.List; List java.util import java.util.Collections; Collections java.util import java.util.Arrays; Arrays java.util public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final int n = sc.nextInt();
    final List<Long> list = new ArrayList<>();

    long max = 1000000000000000000L;
    long count = 1;
    
    for(int i = 0; i < n ; i++){
        list.add(sc.nextLong());
        if(list.get(i) == 0){
            System.out.println(0);
            System.exit(0);
        }
    }

    for(int i = 0; i < n ; i++){
        max /= list.get(i);
        //System.out.println(max);
    }


    if(max < 1){
        System.out.println(-1);
    }else{
        for(int i = 0 ; i < n ; i++){
            count *= list.get(i);
        }
        System.out.println(count);
    }


    









    

    



    
  

    


    


    

    
    
    



    





}
} Main public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final int n = sc.nextInt();
    final List<Long> list = new ArrayList<>();

    long max = 1000000000000000000L;
    long count = 1;
    
    for(int i = 0; i < n ; i++){
        list.add(sc.nextLong());
        if(list.get(i) == 0){
            System.out.println(0);
            System.exit(0);
        }
    }

    for(int i = 0; i < n ; i++){
        max /= list.get(i);
        //System.out.println(max);
    }


    if(max < 1){
        System.out.println(-1);
    }else{
        for(int i = 0 ; i < n ; i++){
            count *= list.get(i);
        }
        System.out.println(count);
    }


    









    

    



    
  

    


    


    

    
    
    



    





} main {
    
    final Scanner sc = new Scanner(System.in);
    final int n = sc.nextInt();
    final List<Long> list = new ArrayList<>();

    long max = 1000000000000000000L;
    long count = 1;
    
    for(int i = 0; i < n ; i++){
        list.add(sc.nextLong());
        if(list.get(i) == 0){
            System.out.println(0);
            System.exit(0);
        }
    }

    for(int i = 0; i < n ; i++){
        max /= list.get(i);
        //System.out.println(max);
    }


    if(max < 1){
        System.out.println(-1);
    }else{
        for(int i = 0 ; i < n ; i++){
            count *= list.get(i);
        }
        System.out.println(count);
    }


    









    

    



    
  

    


    


    

    
    
    



    





} final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc final List<Long> list = new ArrayList<>(); list new ArrayList<>() long max = 1000000000000000000L; max 1000000000000000000L long count = 1; count 1 for(int i = 0; i < n ; i++){
        list.add(sc.nextLong());
        if(list.get(i) == 0){
            System.out.println(0);
            System.exit(0);
        }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        list.add(sc.nextLong());
        if(list.get(i) == 0){
            System.out.println(0);
            System.exit(0);
        }
    } {
        list.add(sc.nextLong());
        if(list.get(i) == 0){
            System.out.println(0);
            System.exit(0);
        }
    } list.add(sc.nextLong()) list.add list sc.nextLong() sc.nextLong sc if(list.get(i) == 0){
            System.out.println(0);
            System.exit(0);
        } list.get(i) == 0 list.get(i) list.get list i 0 {
            System.out.println(0);
            System.exit(0);
        } System.out.println(0) System.out.println System.out System System.out 0 System.exit(0) System.exit System 0 for(int i = 0; i < n ; i++){
        max /= list.get(i);
        //System.out.println(max);
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        max /= list.get(i);
        //System.out.println(max);
    } {
        max /= list.get(i);
        //System.out.println(max);
    } max /= list.get(i) max list.get(i) list.get list i if(max < 1){
        System.out.println(-1);
    }else{
        for(int i = 0 ; i < n ; i++){
            count *= list.get(i);
        }
        System.out.println(count);
    } max < 1 max 1 {
        System.out.println(-1);
    } System.out.println(-1) System.out.println System.out System System.out -1 1 {
        for(int i = 0 ; i < n ; i++){
            count *= list.get(i);
        }
        System.out.println(count);
    } for(int i = 0 ; i < n ; i++){
            count *= list.get(i);
        } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
            count *= list.get(i);
        } {
            count *= list.get(i);
        } count *= list.get(i) count list.get(i) list.get list i System.out.println(count) System.out.println System.out System System.out count final String[] args args public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final int n = sc.nextInt();
    final List<Long> list = new ArrayList<>();

    long max = 1000000000000000000L;
    long count = 1;
    
    for(int i = 0; i < n ; i++){
        list.add(sc.nextLong());
        if(list.get(i) == 0){
            System.out.println(0);
            System.exit(0);
        }
    }

    for(int i = 0; i < n ; i++){
        max /= list.get(i);
        //System.out.println(max);
    }


    if(max < 1){
        System.out.println(-1);
    }else{
        for(int i = 0 ; i < n ; i++){
            count *= list.get(i);
        }
        System.out.println(count);
    }


    









    

    



    
  

    


    


    

    
    
    



    





}
} public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final int n = sc.nextInt();
    final List<Long> list = new ArrayList<>();

    long max = 1000000000000000000L;
    long count = 1;
    
    for(int i = 0; i < n ; i++){
        list.add(sc.nextLong());
        if(list.get(i) == 0){
            System.out.println(0);
            System.exit(0);
        }
    }

    for(int i = 0; i < n ; i++){
        max /= list.get(i);
        //System.out.println(max);
    }


    if(max < 1){
        System.out.println(-1);
    }else{
        for(int i = 0 ; i < n ; i++){
            count *= list.get(i);
        }
        System.out.println(count);
    }


    









    

    



    
  

    


    


    

    
    
    



    





}
} Main
import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
import java.util.Arrays;

public class Main {
	public static void main(final String[] args){
    
    final Scanner sc = new Scanner(System.in);
    final int n = sc.nextInt();
    final List<Long> list = new ArrayList<>();

    long max = 1000000000000000000L;
    long count = 1;
    
    for(int i = 0; i < n ; i++){
        list.add(sc.nextLong());
        if(list.get(i) == 0){
            System.out.println(0);
            System.exit(0);
        }
    }

    for(int i = 0; i < n ; i++){
        max /= list.get(i);
        //System.out.println(max);
    }


    if(max < 1){
        System.out.println(-1);
    }else{
        for(int i = 0 ; i < n ; i++){
            count *= list.get(i);
        }
        System.out.println(count);
    }


    









    

    



    
  

    


    


    

    
    
    



    





}
}