Anti-Distance

아직 제출이 없습니다시간 제한2초메모리 제한256 MB

문제

Consider a plane partitioned into squares with side 11. Let us choose a square and draw coordinate axes from its center parallel to its sides.

Each fifth square contains an obstacle: more precisely, the obstacles are placed in all squares with centers at points (2i+j,i2j)(2 i + j, i - 2 j) for all possible integer ii and jj. The exact placement of obstacles is visualized in the example notes below. All other squares are free.

Amelia stands in some free square AA and wants to move to some free square BB. In one step, she can move from a square to one of its neighbors: the squares sharing a side with it, but only if the corresponding neighboring square is free. What is the minimum possible number of steps Amelia must make to arrive to square BB?

입력

The first line contains two integers x_1x\_1 and y_1y\_1, the coordinates of the initial square AA. The second line contains two integers x_2x\_2 and y_2y\_2, the coordinates of the destination square BB. All given coordinates are between 11 and 10910^{9}. It is guaranteed that both given squares are free.

출력

Print one integer: the minimum possible number of steps from the initial square to the destination square.