We has a N (N <= 10^5) position and 2 car on shaft number (from 0 to 10^9). Initially 2 cars in 2 positions different on the shaft number. Mission is each position in N position has been visited by only 1 in 2 car and visited by ordered 1, 2, 3, .. N. We have a lot of way. But we need find one way has max distance of car 1 and car 2 all time is minimum. Print minimum distance.
Input:
First line has N, pos of car 1, pos of car 2
Second line has N position
Example:
Thanks! <3