#include<bits/stdc++.h>

using namespace std;

int main() {
	cin.tie(0);
int n,a;cin>>n;
vector<int>poz;
vector<int>neg;
for(int i=0;i<n;i++){
	cin>>a;
	if(a>0)poz.push_back(a);
	else neg.push_back(a);
}
vector<int>pot;
sort(poz.begin(),poz.end());
sort(neg.begin(),neg.end());
int b1=0,b2=0,c=0,x=0,kill=0;
for(int i=0;i<5;i++){
	//cout<<poz[b1]<<" "<<b1<<" "<<neg[b2]<<" "<<b2<<" "<<kill<<" "<<x<<endl;
	if(b2>=neg.size() && b1>=poz.size() || x==poz[b1] || x==neg[b2])break;
	if(c%2==0){
		if((poz[b1]<abs(neg[b2]) && b1<=poz.size()) || (b2>=neg.size())){
			kill++;
			b1++;
			pot.push_back(1);
	
			
		}
		else if(b2<=neg.size()){
			kill++;
				b2++;
				pot.push_back(2);
		
		}
		
	
	}
else {
	x++;pot.push_back(3);
}	
	
for(int i=0;i<poz.size();i++)poz[i]-=1;
for(int i=0;i<neg.size();i++)neg[i]+=1;
	

	
c++;	
}
cout<<kill<<endl;
for(int i=0;i<pot.size();i++){
	cout<<pot[i];
}

}