#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[1005], i, n;
  bool b = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 1) b = 1;
  }
  if (b)
    cout << "-1\n";
  else
    cout << "1\n";
  return 0;
}
