using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
    static void Main()
    {
        int n = int.Parse(Console.ReadLine()!);
        var dementors = Console.ReadLine()!
            .Split(' ')
            .Select(int.Parse)
            .ToList();

        var front = dementors.Where(x => x > 0).OrderBy(x => x).ToList();
        var back = dementors.Where(x => x < 0).OrderByDescending(x => x).ToList();

        int eliminated = 0;
        List<char> moves = new List<char>();

        bool lastWasSpell = false;

        foreach (var d in back)
        {
            moves.Add('2');
            eliminated++;
            lastWasSpell = true;

            if (lastWasSpell)
            {
                moves.Add('3');
                lastWasSpell = false;
            }
        }

        foreach (var d in front)
        {
            moves.Add('1');
            eliminated++;
            lastWasSpell = true;

            if (lastWasSpell)
            {
                moves.Add('3');
                lastWasSpell = false;
            }
        }

        Console.WriteLine(eliminated);
        Console.WriteLine(new string(moves.ToArray()));
    }
}