#include <bits/stdc++.h>
using namespace std;
int n;
int num[1003];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &num[i]);
  int x = *min_element(num, num + n);
  printf("%d", x > 1 ? 1 : -1);
}
