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

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    BigInteger ans = BigInteger.ONE;
    int n = sc.nextInt();

    for (int i = 0; i < n; i++) {
      BigInteger next = sc.nextBigInteger();

      if (!ans.equals(BigInteger.valueOf(-1))) {
        if (ans.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0) {
          ans = BigInteger.valueOf(-1);
        } else {
          ans = ans.multiply(next);
        }
      } else {
        if (next.equals(BigInteger.ZERO)) {
          ans = BigInteger.ZERO;
          break;
        }
      }
    }

    System.out.println(ans);
  }
}
 import java.util.*; util.* java import java.math.*; math.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    BigInteger ans = BigInteger.ONE;
    int n = sc.nextInt();

    for (int i = 0; i < n; i++) {
      BigInteger next = sc.nextBigInteger();

      if (!ans.equals(BigInteger.valueOf(-1))) {
        if (ans.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0) {
          ans = BigInteger.valueOf(-1);
        } else {
          ans = ans.multiply(next);
        }
      } else {
        if (next.equals(BigInteger.ZERO)) {
          ans = BigInteger.ZERO;
          break;
        }
      }
    }

    System.out.println(ans);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    BigInteger ans = BigInteger.ONE;
    int n = sc.nextInt();

    for (int i = 0; i < n; i++) {
      BigInteger next = sc.nextBigInteger();

      if (!ans.equals(BigInteger.valueOf(-1))) {
        if (ans.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0) {
          ans = BigInteger.valueOf(-1);
        } else {
          ans = ans.multiply(next);
        }
      } else {
        if (next.equals(BigInteger.ZERO)) {
          ans = BigInteger.ZERO;
          break;
        }
      }
    }

    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    BigInteger ans = BigInteger.ONE;
    int n = sc.nextInt();

    for (int i = 0; i < n; i++) {
      BigInteger next = sc.nextBigInteger();

      if (!ans.equals(BigInteger.valueOf(-1))) {
        if (ans.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0) {
          ans = BigInteger.valueOf(-1);
        } else {
          ans = ans.multiply(next);
        }
      } else {
        if (next.equals(BigInteger.ZERO)) {
          ans = BigInteger.ZERO;
          break;
        }
      }
    }

    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) BigInteger ans = BigInteger.ONE; ans BigInteger.ONE BigInteger BigInteger.ONE int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++) {
      BigInteger next = sc.nextBigInteger();

      if (!ans.equals(BigInteger.valueOf(-1))) {
        if (ans.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0) {
          ans = BigInteger.valueOf(-1);
        } else {
          ans = ans.multiply(next);
        }
      } else {
        if (next.equals(BigInteger.ZERO)) {
          ans = BigInteger.ZERO;
          break;
        }
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      BigInteger next = sc.nextBigInteger();

      if (!ans.equals(BigInteger.valueOf(-1))) {
        if (ans.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0) {
          ans = BigInteger.valueOf(-1);
        } else {
          ans = ans.multiply(next);
        }
      } else {
        if (next.equals(BigInteger.ZERO)) {
          ans = BigInteger.ZERO;
          break;
        }
      }
    } {
      BigInteger next = sc.nextBigInteger();

      if (!ans.equals(BigInteger.valueOf(-1))) {
        if (ans.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0) {
          ans = BigInteger.valueOf(-1);
        } else {
          ans = ans.multiply(next);
        }
      } else {
        if (next.equals(BigInteger.ZERO)) {
          ans = BigInteger.ZERO;
          break;
        }
      }
    } BigInteger next = sc.nextBigInteger(); next sc.nextBigInteger() sc.nextBigInteger sc if (!ans.equals(BigInteger.valueOf(-1))) {
        if (ans.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0) {
          ans = BigInteger.valueOf(-1);
        } else {
          ans = ans.multiply(next);
        }
      } else {
        if (next.equals(BigInteger.ZERO)) {
          ans = BigInteger.ZERO;
          break;
        }
      } !ans.equals(BigInteger.valueOf(-1)) ans.equals(BigInteger.valueOf(-1)) ans.equals ans BigInteger.valueOf(-1) BigInteger.valueOf BigInteger -1 1 {
        if (ans.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0) {
          ans = BigInteger.valueOf(-1);
        } else {
          ans = ans.multiply(next);
        }
      } if (ans.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0) {
          ans = BigInteger.valueOf(-1);
        } else {
          ans = ans.multiply(next);
        } ans.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0 ans.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) ans.multiply(next).compareTo ans.multiply(next) ans.multiply ans next BigInteger.valueOf(1000000000000000000L) BigInteger.valueOf BigInteger 1000000000000000000L 0 {
          ans = BigInteger.valueOf(-1);
        } ans = BigInteger.valueOf(-1) ans BigInteger.valueOf(-1) BigInteger.valueOf BigInteger -1 1 {
          ans = ans.multiply(next);
        } ans = ans.multiply(next) ans ans.multiply(next) ans.multiply ans next {
        if (next.equals(BigInteger.ZERO)) {
          ans = BigInteger.ZERO;
          break;
        }
      } if (next.equals(BigInteger.ZERO)) {
          ans = BigInteger.ZERO;
          break;
        } next.equals(BigInteger.ZERO) next.equals next BigInteger.ZERO BigInteger BigInteger.ZERO {
          ans = BigInteger.ZERO;
          break;
        } ans = BigInteger.ZERO ans BigInteger.ZERO BigInteger BigInteger.ZERO break; 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);
    BigInteger ans = BigInteger.ONE;
    int n = sc.nextInt();

    for (int i = 0; i < n; i++) {
      BigInteger next = sc.nextBigInteger();

      if (!ans.equals(BigInteger.valueOf(-1))) {
        if (ans.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0) {
          ans = BigInteger.valueOf(-1);
        } else {
          ans = ans.multiply(next);
        }
      } else {
        if (next.equals(BigInteger.ZERO)) {
          ans = BigInteger.ZERO;
          break;
        }
      }
    }

    System.out.println(ans);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    BigInteger ans = BigInteger.ONE;
    int n = sc.nextInt();

    for (int i = 0; i < n; i++) {
      BigInteger next = sc.nextBigInteger();

      if (!ans.equals(BigInteger.valueOf(-1))) {
        if (ans.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0) {
          ans = BigInteger.valueOf(-1);
        } else {
          ans = ans.multiply(next);
        }
      } else {
        if (next.equals(BigInteger.ZERO)) {
          ans = BigInteger.ZERO;
          break;
        }
      }
    }

    System.out.println(ans);
  }
} Main
import java.util.*;
import java.math.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    BigInteger ans = BigInteger.ONE;
    int n = sc.nextInt();

    for (int i = 0; i < n; i++) {
      BigInteger next = sc.nextBigInteger();

      if (!ans.equals(BigInteger.valueOf(-1))) {
        if (ans.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0) {
          ans = BigInteger.valueOf(-1);
        } else {
          ans = ans.multiply(next);
        }
      } else {
        if (next.equals(BigInteger.ZERO)) {
          ans = BigInteger.ZERO;
          break;
        }
      }
    }

    System.out.println(ans);
  }
}

