#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long x;
  vector<long> v;
  cin >> n;
  while (n--) {
    cin >> x;
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  if (v[0] == 1)
    cout << "-1" << endl;
  else
    cout << "1" << endl;
  return 0;
}
