Run id: 7121

------Input------
2 0 1 0 3 0 2
------Answer-----
48
------Your output-----
22