#include <bits/stdc++.h>
using namespace std;
int n, x = 1, y;
bool f[100], s[100];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> y;
    if (y == 1) {
      x = -1;
    }
  }
  cout << x << endl;
  return 0;
}
