import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		long ans = 1;
		long []A = new long[N];
		for(int a = 0; a < N; a++){
			A[a] = stdIn.nextLong();
		}
		for(int b = 0; b < N; b++){
			if(A[b] == 0){
				ans = 0;
				break;
			}
			else if(A[b] > (long)Math.pow(10, 18)/ans){
				ans = -1;
			}
			else{
				ans *= A[b];
			}
		}
		System.out.println(ans);
		stdIn.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		long ans = 1;
		long []A = new long[N];
		for(int a = 0; a < N; a++){
			A[a] = stdIn.nextLong();
		}
		for(int b = 0; b < N; b++){
			if(A[b] == 0){
				ans = 0;
				break;
			}
			else if(A[b] > (long)Math.pow(10, 18)/ans){
				ans = -1;
			}
			else{
				ans *= A[b];
			}
		}
		System.out.println(ans);
		stdIn.close();
	}
} Main public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		long ans = 1;
		long []A = new long[N];
		for(int a = 0; a < N; a++){
			A[a] = stdIn.nextLong();
		}
		for(int b = 0; b < N; b++){
			if(A[b] == 0){
				ans = 0;
				break;
			}
			else if(A[b] > (long)Math.pow(10, 18)/ans){
				ans = -1;
			}
			else{
				ans *= A[b];
			}
		}
		System.out.println(ans);
		stdIn.close();
	} main {
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		long ans = 1;
		long []A = new long[N];
		for(int a = 0; a < N; a++){
			A[a] = stdIn.nextLong();
		}
		for(int b = 0; b < N; b++){
			if(A[b] == 0){
				ans = 0;
				break;
			}
			else if(A[b] > (long)Math.pow(10, 18)/ans){
				ans = -1;
			}
			else{
				ans *= A[b];
			}
		}
		System.out.println(ans);
		stdIn.close();
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int N = stdIn.nextInt(); N stdIn.nextInt() stdIn.nextInt stdIn long ans = 1; ans 1 long []A = new long[N]; A new long[N] N for(int a = 0; a < N; a++){
			A[a] = stdIn.nextLong();
		} int a = 0; int a = 0; a 0 a < N a N a++ a++ a {
			A[a] = stdIn.nextLong();
		} {
			A[a] = stdIn.nextLong();
		} A[a] = stdIn.nextLong() A[a] A a stdIn.nextLong() stdIn.nextLong stdIn for(int b = 0; b < N; b++){
			if(A[b] == 0){
				ans = 0;
				break;
			}
			else if(A[b] > (long)Math.pow(10, 18)/ans){
				ans = -1;
			}
			else{
				ans *= A[b];
			}
		} int b = 0; int b = 0; b 0 b < N b N b++ b++ b {
			if(A[b] == 0){
				ans = 0;
				break;
			}
			else if(A[b] > (long)Math.pow(10, 18)/ans){
				ans = -1;
			}
			else{
				ans *= A[b];
			}
		} {
			if(A[b] == 0){
				ans = 0;
				break;
			}
			else if(A[b] > (long)Math.pow(10, 18)/ans){
				ans = -1;
			}
			else{
				ans *= A[b];
			}
		} if(A[b] == 0){
				ans = 0;
				break;
			}
			else if(A[b] > (long)Math.pow(10, 18)/ans){
				ans = -1;
			}
			else{
				ans *= A[b];
			} A[b] == 0 A[b] A b 0 {
				ans = 0;
				break;
			} ans = 0 ans 0 break; if(A[b] > (long)Math.pow(10, 18)/ans){
				ans = -1;
			}
			else{
				ans *= A[b];
			} A[b] > (long)Math.pow(10, 18)/ans A[b] A b (long)Math.pow(10, 18)/ans (long)Math.pow(10, 18) Math.pow Math 10 18 ans {
				ans = -1;
			} ans = -1 ans -1 1 {
				ans *= A[b];
			} ans *= A[b] ans A[b] A b System.out.println(ans) System.out.println System.out System System.out ans stdIn.close() stdIn.close stdIn String[] args args public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		long ans = 1;
		long []A = new long[N];
		for(int a = 0; a < N; a++){
			A[a] = stdIn.nextLong();
		}
		for(int b = 0; b < N; b++){
			if(A[b] == 0){
				ans = 0;
				break;
			}
			else if(A[b] > (long)Math.pow(10, 18)/ans){
				ans = -1;
			}
			else{
				ans *= A[b];
			}
		}
		System.out.println(ans);
		stdIn.close();
	}
} public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		long ans = 1;
		long []A = new long[N];
		for(int a = 0; a < N; a++){
			A[a] = stdIn.nextLong();
		}
		for(int b = 0; b < N; b++){
			if(A[b] == 0){
				ans = 0;
				break;
			}
			else if(A[b] > (long)Math.pow(10, 18)/ans){
				ans = -1;
			}
			else{
				ans *= A[b];
			}
		}
		System.out.println(ans);
		stdIn.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		int N = stdIn.nextInt();
		long ans = 1;
		long []A = new long[N];
		for(int a = 0; a < N; a++){
			A[a] = stdIn.nextLong();
		}
		for(int b = 0; b < N; b++){
			if(A[b] == 0){
				ans = 0;
				break;
			}
			else if(A[b] > (long)Math.pow(10, 18)/ans){
				ans = -1;
			}
			else{
				ans *= A[b];
			}
		}
		System.out.println(ans);
		stdIn.close();
	}
}