#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  long n, i, k, s, x, p;
  while (cin >> n) {
    long a[100009] = {0}, mn1, mn2, mn, mx1, mx2, mx;
    for (i = 0; i < n; i++) cin >> a[i];
    sort(a, a + n);
    if (a[0] == 1) {
      cout << "-1" << endl;
      continue;
    }
    cout << "1" << endl;
  }
  return 0;
}
