Run id: 115

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