#include <bits/stdc++.h>
using namespace std;
int a, b, z, d, v[100005], h[100005], n, m, x, i, j, ok;
char s[100005], c[100005];
int main() {
  cin >> n;
  ok = 1;
  for (i = 1; i <= n; i++) {
    cin >> a;
    if (a == 1) ok = -1;
  }
  cout << ok;
  return 0;
}
