#include <bits/stdc++.h>   using namespace std;   int c, a, i, n;   int main() {     cin >> n;     for (i = 0; i < n; i++) {       cin >> a;       if (i == 0)         c = a;       else         c = min(c, a);     }     if (c == 1)       cout << -1;     else       cout << 1;   }   