#include <bits/stdc++.h>
using namespace std;
int s[1010];
int f[2000010];
int main() {
  int n;
  cin >> n;
  int flag = 0;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    if (s[i] == 1) flag = 1;
  }
  if (flag) {
    cout << "-1" << endl;
  } else {
    cout << "1" << endl;
  }
}
