#include <bits/stdc++.h>
int main() {
  int n, i, j, temp;
  scanf("%d\n", &n);
  int arr[n];
  for (i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
  }
  for (i = 0; i < n - 1; i++) {
    for (j = i + 1; j < n; j++) {
      if (arr[i] > arr[j]) {
        temp = arr[i];
        arr[i] = arr[j];
        arr[j] = temp;
      }
    }
  }
  if (arr[0] == 1) {
    printf("-1");
  } else {
    printf("1");
  }
  return 0;
}
