#include <bits/stdc++.h>
const double pi = acos(-1);
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A.(N);
  int answer = 1;
  for(int i = 0; i < N; i++){
    cin >> A.at(i);
  }
  for(int i = 0; i < N; i++){
    answer *= A.at(i);
  }
  if(answer < 1000000000000000001){
    cout << answer << endl;
  }
  else(anser >= 1000000000000000001){
    cout << -1 << endl;
  }
  
}