The lazy cookie monster has been trapped in a one dimensional world. In this world, n cookies have been scattered at some points on the x-axis (which is the only axis in that world). The cookie monster, who is initially at X, has to collect them all and then reach position Y to get out. However, the cookie monster is lazy and wants to find the least distance he needs to travel to achieve this purpose. Your task is to assist the monster by finding the minimum distance to travel.
The first line contains the value of n, X and Y separated by a space.
The next line contains n space separated integers, where the ith integer indicates the location of one such cookie.
Print a single line containing the minimum distance.
0 ≤ n ≤ 100000
- 109 ≤ X, Y, cookie coordinates ≤ 109