#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int num[1005];
  bool flag = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &num[i]);
    if (num[i] == 1) flag = 1;
  }
  if (flag)
    printf("-1");
  else
    printf("1");
}
