Run id: 110

------Input------
3 2 2 2
------Answer-----
0
------Your output-----
3