#include <bits/stdc++.h>
using namespace std;
int main()
{
    long long n,i,pom,res=0,pot=0,poraz=0,nep=0,poz=0,neg=0;
    cin>>n;
    deque <pair <long long, long long> > pd(n);
    deque <long long> res2;
    for(i=0;i<n;i++)
    {
        cin>>pom;
        pd[i].first=abs(pom);
        pd[i].second=pom;
        if(nep==0 && int(abs(pom))%2==1)
        {
            nep++;
        }
        if(neg==0 && pom<0)
        {
            neg++;
        }
        if(poz==0 && pom>0)
        {
            poz++;
        }
    }
    sort(pd.begin(), pd.end());
    while(pd.size()!=0 && res<1000000 && poraz!=1)
    {
        if(pd[0].first==pd[1].first && pd[0].first-pot==1 && res2[res2.size()-1]==2)
        {
            res++;
            pot++;
            res2.push_front(1);
            pd.pop_front();
            poraz=1;
        }
        else if(pd[0].first==pd[1].first && pd[0].first-pot==1 && res2[res2.size()-1]==1)
        {
            res++;
            pot++;
            res2.push_front(2);
            pd.pop_front();
            poraz=1;
        }
        poraz=1;
    }
    if(nep==0)
    {
        if(n>1000000)
        {
            cout<<1000000<<endl;
            for(i=0;i<1000000;i++)
            {
                if(int(i)%2==0)
                {
                    cout<<1;
                }
                else if(int(i)%2==1)
                {
                    cout<<2;
                }
            }
        }
        else
        {
            cout<<n;
            for(i=0;i<n;i++)
            {
                if(int(i)%2==0)
                {
                    cout<<1;
                }
                else if(int(i)%2==1)
                {
                    cout<<2;
                }
            }
        }
    }
    else if(poz==0)
    {
        if(n>1000000)
        {
            cout<<1000000<<endl;
            for(i=0;i<1000000;i++)
            {
                if(int(i)%2==0)
                {
                    cout<<3;
                }
                else if(int(i)%2==1)
                {
                    cout<<2;
                }
            }
        }
        else
        {
            cout<<n<<endl;
            for(i=0;i<n;i++)
            {
                if(int(i)%2==0)
                {
                    cout<<3;
                }
                else if(int(i)%2==1)
                {
                    cout<<2;
                }
            }
        }
    }
    else
    {
    cout<<res<<endl;
    for(i=0;i<res2.size();i++)
    {
        cout<<res2[i];
    }
    }
    return 0;
}