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