Transfer points#4423

Transfer points

1 saniye
128 megabayt
Çok kolay

To unload the new avenue, it was decided to launch two new bus routes at different sections of the avenue. The final stops of each of the buses are known.

Determine the number of stops where you can change from one bus to another.

Giriş

Four numbers - the numbers of the final stops, first of the first, then of the second bus. Numbers do not exceed 10^9.

Çıktı

Print the required number of stops.

Örnekler

Örnek 1

Loading
Loading