| 2020-2021 ICPC, Moscow Subregional |
|---|
| Finished |
Flatland is a two-dimensional plane. Points with both coordinates different from zero are called free. Points with at least one zero coordinate are called custom points; when passing through these points one should pay $$$1$$$ flatland dollar as a fee.
Adventurer stands at the free point with integer non-zero coordinates $$$x_1$$$ and $$$y_1$$$ and the goal of his adventure is to reach the free point with non-zero coordinates $$$x_2$$$ and $$$y_2$$$. He is allowed to choose any route he wants. Calculate minimum possible fee to be paid by adventurer.
Input contains four integers $$$x_1$$$, $$$y_1$$$, $$$x_2$$$ and $$$y_2$$$ — coordinates of the start point and the finish point respectively ($$$x_1 \ne 0$$$, $$$y_1 \ne 0$$$, $$$x_2 \ne 0$$$, $$$y_2 \ne 0$$$, $$$-10\,000 \le x_1,y_1,x_2,y_2 \le 10\,000$$$).
Print minimum possible fee in flatland dollars to be paid by adventurer.
25 11 -20 -20
1
20 20 20 21
0
| Name |
|---|


