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

Задача 38310. Transplants


On Novy Prospekt for unloading, it was decided to launch two new bus routes on different sections of the avenue.  The final stops of each of the buses are known. Determine the number of stops  where you can transfer from one bus to another.

Input
Four numbers are entered, not exceeding 100, specifying the numbers of the final stops. First for the first, then the second bus (see examples and picture).

Imprint
Your program should output a single number – desired number of stops.
Examples
# Input Output Explanation
1 3 6 4 2 2 The first bus runs from the 3rd stop to the 6th and back, and the second from the 2nd to the 4th and back. You can transfer from one bus to another at the 3rd and 4th stops. There are two of them.
2 3 1 5 10 0 buses do not have common stops.