#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, i, a, b, j, pos = 0, neg = 0, flag = 0, temp;
  string st, st2, st3;
  vector<long long int> v2, v;
  long long int hash[51] = {0}, hashb[51] = {0};
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> temp;
    v.push_back(temp);
  }
  sort(v.begin(), v.end());
  if (v[0] == 1)
    cout << -1;
  else
    cout << 1;
  return 0;
}
