#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long int a;
  vector<long int>::iterator t;
  vector<long int> p;
  for (int i = 0; i < n; i++) {
    cin >> a;
    p.push_back(a);
  }
  sort(p.begin(), p.begin() + n);
  if (p[0] == 1) {
    cout << "-1" << endl;
    return 0;
  } else
    cout << "1" << endl;
  return 0;
}
