#include <bits/stdc++.h>
using namespace std;
const int MaxN = 1e3;
int m, n, a[MaxN + 5];
bool cmp(int x, int y) { return x < y; }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1, cmp);
  if (a[1] == 1) printf("%d", -1);
  if (a[1] != 1) printf("%d", 1);
}
