Олимпиадный тренинг

Задача 38273. New Capital


In the country from the previous task, there are many specialists not only in the protection of children, but also in the design of cities. Therefore, in order to solve the problem of traffic jams in the overcrowded capital once and for all, it was decided to build a new capital and move the entire government there. It is said — done.

The streets in the new capital form a regular rectangular grid in which all streets intersect at exactly one local length unit. Vertically running streets are called streets, and horizontally running — alleys. In total, the city got 2000 streets and 2000 alleys, therefore, in order not to come up with many new names, they were all simply numbered. The streets were numbered from west to east with numbers from −1000 to 999, and alleys — from south to north, also numbers from −1000 to 999. The city center is considered to be blocks at the intersection of streets and alleys with numbers from −100 to 100.

In order to increase the capacity of roads in the city, it was decided to make all streets and alleys one-way. On streets with even numbers it is allowed to drive only from north to south, and on streets with odd numbers — only from south to north. Similarly, even-numbered alleys can only be driven from east to west, and odd-numbered — only from west to east.

How many local units of length will the mayor of the new capital have to pass every evening, returning home from the mayor's office of the city? Both the city hall and the mayor's house are located in the city center. The mayor is driving home by the shortest route, observing, however, the rules of the road.

Input
The first line contains two numbers x1 and y1 — street number and alley number at the intersection of which the city hall is located. The second line contains two numbers x2 and y2 — street number and alley number at the intersection of which the mayor's house is located. All numbers are integers and do not exceed 100 in absolute value.

Imprint
Print one number: the length of the shortest path from the mayor's office to the mayor's house by car.-
 
Examples
# Input Output
1 0 0
1 1
4
2 3 5
24
4