#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define fix cout << fixed; cout << setprecision(10)





void solve() {

	int n;
	cin >> n;
	ll x;
	ll p = 1;
	while(n--) {
		cin >> x;
		if(x == 0) {
			p = 0;
		}
		else if(x * p < 0 && p > 0) {
			p *= x;
		}
		else {
			p = -1;
		}
	}
	cout << p << "\n";



	
}

int main() {

	ios_base::sync_with_stdio(0);
	cin.tie(NULL);
	
	solve();

	return 0;
}