#include<iostream>
#include<vector>
using namespace std;
int main (){
    int n;
    cin >> n;
    vector <int> x(n);
    bool h = false, t = false;
    for (int i = 0; i < n; i++){
        cin >> x[i];
        if (x[i] == 1) h = true;
        if (x[i] == -1) t = true;
    }
    if (h && t){
        cout << 1 << endl << 1;
    }
}