#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, a[1005];
  bool flag = false;
  while (~scanf("%d", &n)) {
    for (i = 0; i < n; i++) {
      scanf("%d", &a[i]);
      if (a[i] == 1) flag = true;
    }
    printf(flag ? "-1\n" : "1\n");
  }
  return 0;
}
