#include <bits/stdc++.h>
using namespace std;
int n;
int val[1000 + 10];
int ans;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", val + i);
  sort(val + 1, val + 1 + n);
  if (val[1] == 1)
    printf("-1\n");
  else
    printf("1\n");
  return 0;
}
