Run id: 116478

------Input------
5 2 2 12 4 7
------Answer-----
4
------Your output-----
22212214110