#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1e3 + 10;
const int inf = 1e9;
int a[N];
int main() {
  int n, mn = inf;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    mn = min(mn, a[i]);
  }
  if (mn == 1) {
    cout << -1 << '\n';
  } else {
    cout << 1 << '\n';
  }
}
