#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int* nab = new int[n];
  for (int i = 0; i < n; i++) cin >> nab[i];
  sort(nab, nab + n);
  if (nab[0] == 1)
    cout << -1;
  else
    cout << 1;
  return 0;
}
