Manhattan distance

The streets in the central part of Manhattan are constructed in a way that resembles a grid. To get from one crossroad you need to go parallel in one direction and then vertical in another. So, if we imagine a virtual X and Y axis, in Manhattan, we always move either parallel to the OX axis or parallel to the OY axis.

photo.jpg

This construction of streets has become so popular that people started using it as a distance metric. When it’s only allowed to move in the OX or the OY directions and one needs to get from (x1,y1)(x_1, y_1) to (x2,y2)(x_2, y_2), they first move parallel to the OX axis to get from x1x_1 to x2x_2 and afterward from y1y_1 to y2y_2. This changes the calculations of distance between points and is called Manhattan distance. The standard Euclidean distance is d=(x2−x1)2+(y2−y1)2d = \sqrt{(x2 - x1)^2 + (y2 - y1)^2}.

Can you figure out the Manhattan distance between two points?

The input consists of 4 numbers: x1x_1 and y1y_1 coordinates of the first point followed by x2x_2 and y2y_2 coordinates of the second point. The program should output the Manhattan distance between those two points.

Input

Output

3
4
1
0.5

5.5

Screen Shot 2022-04-20 at 5.51.22 PM.png

Constraints

Time limit: 1.6 seconds

Memory limit: 512 MB

Output limit: 1 MB