#include <bits/stdc++.h>
using namespace std;
int n, a[10000000];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  a[0] == 1 ? cout << -1 : cout << 1;
  return 0;
}
