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