function Main(input) {
	var str = input;
	var ans = 1;
	var count = 1;
	var str = str.split("\n");
	var a = Number(str[0].split(" ")[1]);
	for(var i = 0;i<a.length;i++){
		a[i]=Number(a[i]);
		ans = ans *a[i];
	}
	if(ans > 10**18){
		ans = -1;	
	}
	console.log(ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));