#include <bits/stdc++.h>

using namespace std;
int main()
{
    long long n,x,brn,brj,d;
    bool nmog=false,ni=false,ji=false;
    cin >> n;
    brn=0;
    brj=0;
    d=0;
    for(int i=0;i<n;i++){
        cin >> x;
        if(x==1){
            ni=true;
            brn++;
        }
        else if(x==(-1)){
            ji=true;
            brj++;
        }
        if(x>1){
            brn++;
        }
        else{
            brj++;
        }
    }
    if(ni==true && ji==true){
        nmog=true;
        cout << '1' << endl << '1';
        return 0;
    }
    if(n>1000000){
        n==1000000;
    }
    else if((brn-brj)*2+min(brj,brn)>1000000){
        cout << (1000000-min(brj,brn))/2+min(brj,brn)*2 << endl;
    }
    else{
        cout << (brn-brj)*2+min(brj,brn)*2 << endl;
    }
    while(!nmog && n>0){
        while(brn!=0 && brj!=0 && n>0){
            if(ji){
                brn--;
                brj--;
                cout << '2' << '1';
                d+=2;
            }
            else{
                brn--;
                brj--;
                cout << '1' << '2';
                d+=2;
            }
            n=n-2;
        }
        while(brn!=0 && n>0){
            brn--;
            cout << '1' << '2';
            d++;
        }
        while(brj!=0 && n>0){
            brj--;
            cout << '2' << '3';
            d++;
        }
        n--;
    }
    return 0;
}