#include <bits/stdc++.h>
using namespace std;

#define MAX_POTEZI 1000000

int N;
int x_poz[300000];
int x_poz_n = 0;
int x_neg[300000];
int x_neg_n = 0;

int main() {
    cin >> N;

    bool all_pos = true;
    bool all_neg = true;
    bool all_parni = true;
    for(int i = 0; i < N; i++) {
        int x;
        cin >> x;
        if(x > 0) {
            x_poz[x_poz_n] = x;
            x_poz_n++;

            all_neg = false;
            if(x % 2 == 0)
                all_parni = false;
        } else if(x < 0) {
            x_neg[x_neg_n] = x;
            x_neg_n++;

            all_pos = false;
            if((-x) % 2 == 0)
                all_parni = false;
        }
    }
    sort(x_poz, x_poz + x_poz_n, [](const int& a, const int& b) -> bool {
        return a > b;
    });
    sort(x_neg, x_neg + x_neg_n);

    if(x_neg_n == 1 && x_poz_n == 0) {
        cout << "1\n2\n";
        return 0;
    }
    if(x_poz_n == 1 && x_neg_n == 0) {
        cout << "1\n1\n";
        return 0;
    }

    // ode nas hari svakako
    if(x_neg_n > 0 && x_neg[x_neg_n - 1] == -1 && x_poz_n > 0 && x_poz[x_poz_n - 1] == 1) {
        cout << "1\n1\n";
        return 0;
    }

    if(all_neg) {
        int d = N > MAX_POTEZI ? MAX_POTEZI : N;
        cout << d << '\n';
        for(int i = 0; i < d; i++) {
            cout << "23";
        }
        cout << '\n';
        return 0;
    } else if(all_pos) {
        int unisteni = 0;

        bool prvi_potez = true;
        int broj_poteza = 0;
        string potezi = "";
        while(broj_poteza < MAX_POTEZI) {
            //cout << "pocetno stnaje: " << x_poz[x_poz_n - 1] << endl;
            if(prvi_potez) {
                unisteni++;
                x_poz_n--;
                x_poz[x_poz_n - 1] -= broj_poteza;
                x_poz[x_poz_n - 1]--;
                potezi += "1";
            } else {
                x_poz[x_poz_n - 1]--;
                potezi += "2";
            }
            if(x_poz[x_poz_n - 1] == 0) {
                break;
            }
            prvi_potez = !prvi_potez;
            broj_poteza++;
        }

        cout << unisteni << '\n' << potezi << '\n';
        return 0;
    }
}