#include <bits/stdc++.h>
using namespace std;
inline int in() {
  int res = 0;
  char c;
  while ((c = getchar()) < '0' || c > '9')
    ;
  while (c >= '0' && c <= '9') res = res * 10 + c - '0', c = getchar();
  return res;
}
int a[1111];
bool vis[1000010];
int main() {
  int n = in();
  for (int i = 0; i < n; i++) {
    a[i] = in();
  }
  sort(a, a + n);
  if (a[0] > 1) {
    puts("1");
    return 0;
  } else if (a[0] == 1) {
    puts("-1");
    return 0;
  }
  return 0;
}
