import java.util.*;
import java.math.BigDecimal;

public class Main {
  public static void main (String args[]) {
    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    String A[] = new String[N];
    BigDecimal C = new BigDecimal("1000000000000000000");
    String B = "";
    
    for(int i=0; i<N; i++) {
      A[i] = sc.next();
    }
    Arrays.sort(A);
    BigDecimal z = new BigDecimal("0");
    BigDecimal b = new BigDecimal("1");
    for(int j=0; j<N; j++) {
      BigDecimal b1 = new BigDecimal(A[j]);
      b= b.multiply(b1);
      if(b.compareTo(z) == 0) {
        break;
      } else if(b.compareTo(C) > 0) {
        b = new BigDecimal("-1");
        break;
      }
    }
    System.out.println(b);
  }
} import java.util.*; util.* java import java.math.BigDecimal; BigDecimal java.math public class Main {
  public static void main (String args[]) {
    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    String A[] = new String[N];
    BigDecimal C = new BigDecimal("1000000000000000000");
    String B = "";
    
    for(int i=0; i<N; i++) {
      A[i] = sc.next();
    }
    Arrays.sort(A);
    BigDecimal z = new BigDecimal("0");
    BigDecimal b = new BigDecimal("1");
    for(int j=0; j<N; j++) {
      BigDecimal b1 = new BigDecimal(A[j]);
      b= b.multiply(b1);
      if(b.compareTo(z) == 0) {
        break;
      } else if(b.compareTo(C) > 0) {
        b = new BigDecimal("-1");
        break;
      }
    }
    System.out.println(b);
  }
} Main public static void main (String args[]) {
    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    String A[] = new String[N];
    BigDecimal C = new BigDecimal("1000000000000000000");
    String B = "";
    
    for(int i=0; i<N; i++) {
      A[i] = sc.next();
    }
    Arrays.sort(A);
    BigDecimal z = new BigDecimal("0");
    BigDecimal b = new BigDecimal("1");
    for(int j=0; j<N; j++) {
      BigDecimal b1 = new BigDecimal(A[j]);
      b= b.multiply(b1);
      if(b.compareTo(z) == 0) {
        break;
      } else if(b.compareTo(C) > 0) {
        b = new BigDecimal("-1");
        break;
      }
    }
    System.out.println(b);
  } main {
    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    String A[] = new String[N];
    BigDecimal C = new BigDecimal("1000000000000000000");
    String B = "";
    
    for(int i=0; i<N; i++) {
      A[i] = sc.next();
    }
    Arrays.sort(A);
    BigDecimal z = new BigDecimal("0");
    BigDecimal b = new BigDecimal("1");
    for(int j=0; j<N; j++) {
      BigDecimal b1 = new BigDecimal(A[j]);
      b= b.multiply(b1);
      if(b.compareTo(z) == 0) {
        break;
      } else if(b.compareTo(C) > 0) {
        b = new BigDecimal("-1");
        break;
      }
    }
    System.out.println(b);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc String A[] = new String[N]; A new String[N] N BigDecimal C = new BigDecimal("1000000000000000000"); C new BigDecimal("1000000000000000000") String B = ""; B "" for(int i=0; i<N; i++) {
      A[i] = sc.next();
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
      A[i] = sc.next();
    } {
      A[i] = sc.next();
    } A[i] = sc.next() A[i] A i sc.next() sc.next sc Arrays.sort(A) Arrays.sort Arrays A BigDecimal z = new BigDecimal("0"); z new BigDecimal("0") BigDecimal b = new BigDecimal("1"); b new BigDecimal("1") for(int j=0; j<N; j++) {
      BigDecimal b1 = new BigDecimal(A[j]);
      b= b.multiply(b1);
      if(b.compareTo(z) == 0) {
        break;
      } else if(b.compareTo(C) > 0) {
        b = new BigDecimal("-1");
        break;
      }
    } int j=0; int j=0; j 0 j<N j N j++ j++ j {
      BigDecimal b1 = new BigDecimal(A[j]);
      b= b.multiply(b1);
      if(b.compareTo(z) == 0) {
        break;
      } else if(b.compareTo(C) > 0) {
        b = new BigDecimal("-1");
        break;
      }
    } {
      BigDecimal b1 = new BigDecimal(A[j]);
      b= b.multiply(b1);
      if(b.compareTo(z) == 0) {
        break;
      } else if(b.compareTo(C) > 0) {
        b = new BigDecimal("-1");
        break;
      }
    } BigDecimal b1 = new BigDecimal(A[j]); b1 new BigDecimal(A[j]) b= b.multiply(b1) b b.multiply(b1) b.multiply b b1 if(b.compareTo(z) == 0) {
        break;
      } else if(b.compareTo(C) > 0) {
        b = new BigDecimal("-1");
        break;
      } b.compareTo(z) == 0 b.compareTo(z) b.compareTo b z 0 {
        break;
      } break; if(b.compareTo(C) > 0) {
        b = new BigDecimal("-1");
        break;
      } b.compareTo(C) > 0 b.compareTo(C) b.compareTo b C 0 {
        b = new BigDecimal("-1");
        break;
      } b = new BigDecimal("-1") b new BigDecimal("-1") break; System.out.println(b) System.out.println System.out System System.out b String args[] args public class Main {
  public static void main (String args[]) {
    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    String A[] = new String[N];
    BigDecimal C = new BigDecimal("1000000000000000000");
    String B = "";
    
    for(int i=0; i<N; i++) {
      A[i] = sc.next();
    }
    Arrays.sort(A);
    BigDecimal z = new BigDecimal("0");
    BigDecimal b = new BigDecimal("1");
    for(int j=0; j<N; j++) {
      BigDecimal b1 = new BigDecimal(A[j]);
      b= b.multiply(b1);
      if(b.compareTo(z) == 0) {
        break;
      } else if(b.compareTo(C) > 0) {
        b = new BigDecimal("-1");
        break;
      }
    }
    System.out.println(b);
  }
} public class Main {
  public static void main (String args[]) {
    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    String A[] = new String[N];
    BigDecimal C = new BigDecimal("1000000000000000000");
    String B = "";
    
    for(int i=0; i<N; i++) {
      A[i] = sc.next();
    }
    Arrays.sort(A);
    BigDecimal z = new BigDecimal("0");
    BigDecimal b = new BigDecimal("1");
    for(int j=0; j<N; j++) {
      BigDecimal b1 = new BigDecimal(A[j]);
      b= b.multiply(b1);
      if(b.compareTo(z) == 0) {
        break;
      } else if(b.compareTo(C) > 0) {
        b = new BigDecimal("-1");
        break;
      }
    }
    System.out.println(b);
  }
} Main
import java.util.*;
import java.math.BigDecimal;

public class Main {
  public static void main (String args[]) {
    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    String A[] = new String[N];
    BigDecimal C = new BigDecimal("1000000000000000000");
    String B = "";
    
    for(int i=0; i<N; i++) {
      A[i] = sc.next();
    }
    Arrays.sort(A);
    BigDecimal z = new BigDecimal("0");
    BigDecimal b = new BigDecimal("1");
    for(int j=0; j<N; j++) {
      BigDecimal b1 = new BigDecimal(A[j]);
      b= b.multiply(b1);
      if(b.compareTo(z) == 0) {
        break;
      } else if(b.compareTo(C) > 0) {
        b = new BigDecimal("-1");
        break;
      }
    }
    System.out.println(b);
  }
}