#include <bits/stdc++.h>
using namespace std;
const int maxn = 105;
int a[maxn];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  bool can = false;
  for (int i = 0; i < n; i++) {
    int k;
    cin >> k;
    if (k == 1) can = true;
  }
  can ? cout << -1 : cout << 1;
  return 0;
}
