#include <bits/stdc++.h>
using namespace std;
struct aa {
  int x, y;
  bool operator<(const aa &b) { return x < b.x; }
};
bool cmp(int a, int b) { return a > b; }
int main() {
  int n, a[1000];
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  if (a[0] == 1)
    printf("-1\n");
  else
    printf("1\n");
  return 0;
}
