#include <bits/stdc++.h>
using namespace std;
bool isPal(string);
int main() {
  unordered_set<int> SET;
  vector<int> arr;
  int n;
  cin >> n;
  int x;
  for (int i = 0; i < n; i++) {
    cin >> x;
    SET.insert(x);
    arr.push_back(x);
  }
  sort(arr.begin(), arr.end());
  if (arr[0] == 1) {
    cout << -1 << endl;
  } else {
    cout << 1 << endl;
  }
}
