Vasya takes part in the orienteering competition. There are _n_ checkpoints located along the line at coordinates _x_1, _x_2, ..., _x__n_. Vasya starts at the point with coordinate _a_. His goal is to visit at least _n_ - 1 checkpoint in order to finish the competition. Participant are allowed to visit checkpoints in arbitrary order.
Vasya wants to pick such checkpoints and the order of visiting them that the total distance travelled is minimized. He asks you to calculate this minimum possible value.
## Input
The first line of the input contains two integers _n_ and _a_ (1 ≤ _n_ ≤ 100 000, - 1 000 000 ≤ _a_ ≤ 1 000 000) — the number of checkpoints and Vasya's starting position respectively.
The second line contains _n_ integers _x_1, _x_2, ..., _x__n_ ( - 1 000 000 ≤ _x__i_ ≤ 1 000 000) — coordinates of the checkpoints.
## Output
Print one integer — the minimum distance Vasya has to travel in order to visit at least _n_ - 1 checkpoint.
[samples]
## Note
In the first sample Vasya has to visit at least two checkpoints. The optimal way to achieve this is the walk to the third checkpoints (distance is 12 - 10 = 2) and then proceed to the second one (distance is 12 - 7 = 5). The total distance is equal to 2 + 5 = 7.
In the second sample it's enough to visit only one checkpoint so Vasya should just walk to the point - 10.
Vasya 参加定向越野比赛。有 #cf_span[n] 个检查点位于一条直线上,坐标分别为 #cf_span[x1, x2, ..., xn]。Vasya 从坐标为 #cf_span[a] 的点出发,他的目标是至少访问 #cf_span[n - 1] 个检查点以完成比赛。参赛者可以按任意顺序访问检查点。
Vasya 希望选择一组检查点及其访问顺序,使得总行程距离最小。他请你计算这个最小可能值。
输入的第一行包含两个整数 #cf_span[n] 和 #cf_span[a](#cf_span[1 ≤ n ≤ 100 000],#cf_span[ - 1 000 000 ≤ a ≤ 1 000 000]),分别表示检查点的数量和 Vasya 的起始位置。
第二行包含 #cf_span[n] 个整数 #cf_span[x1, x2, ..., xn](#cf_span[ - 1 000 000 ≤ xi ≤ 1 000 000]),表示检查点的坐标。
请输出一个整数——Vasya 为访问至少 #cf_span[n - 1] 个检查点所需行驶的最小距离。
在第一个样例中,Vasya 必须访问至少两个检查点。最优方案是先走到第三个检查点(距离为 #cf_span[12 - 10 = 2]),然后前往第二个检查点(距离为 #cf_span[12 - 7 = 5])。总距离为 #cf_span[2 + 5 = 7]。
在第二个样例中,只需访问一个检查点即可,因此 Vasya 只需直接走到点 #cf_span[ - 10]。
## Input
输入的第一行包含两个整数 #cf_span[n] 和 #cf_span[a](#cf_span[1 ≤ n ≤ 100 000],#cf_span[ - 1 000 000 ≤ a ≤ 1 000 000]),分别表示检查点的数量和 Vasya 的起始位置。第二行包含 #cf_span[n] 个整数 #cf_span[x1, x2, ..., xn](#cf_span[ - 1 000 000 ≤ xi ≤ 1 000 000]),表示检查点的坐标。
## Output
请输出一个整数——Vasya 为访问至少 #cf_span[n - 1] 个检查点所需行驶的最小距离。
[samples]
## Note
在第一个样例中,Vasya 必须访问至少两个检查点。最优方案是先走到第三个检查点(距离为 #cf_span[12 - 10 = 2]),然后前往第二个检查点(距离为 #cf_span[12 - 7 = 5])。总距离为 #cf_span[2 + 5 = 7]。
在第二个样例中,只需访问一个检查点即可,因此 Vasya 只需直接走到点 #cf_span[ - 10]。
**Definitions**
Let $ n \in \mathbb{Z} $ be the number of checkpoints, $ a \in \mathbb{R} $ be Vasya’s starting position.
Let $ X = \{x_1, x_2, \dots, x_n\} \subset \mathbb{R} $ be the set of checkpoint coordinates.
**Constraints**
1. $ 1 \leq n \leq 100{,}000 $
2. $ -1{,}000{,}000 \leq a \leq 1{,}000{,}000 $
3. $ -1{,}000{,}000 \leq x_i \leq 1{,}000{,}000 $ for all $ i \in \{1, \dots, n\} $
**Objective**
Find the minimum total distance to visit **at least $ n-1 $** checkpoints, starting from $ a $, visiting them in any order:
$$
\min_{S \subseteq X,\, |S| \geq n-1} \left( \min_{\text{permutation } \pi \text{ of } S} \sum_{i=1}^{|S|} \left| p_i - p_{i-1} \right| \right)
$$
where $ p_0 = a $, and $ p_i $ is the $ i $-th checkpoint in the order $ \pi $.
Equivalently, since the optimal path is a contiguous interval on the line (after sorting), and exactly one checkpoint is omitted:
Let $ X_{\text{sorted}} = (x_{(1)}, x_{(2)}, \dots, x_{(n)}) $ be the sorted checkpoints.
Then:
$$
\min \left( \min_{i \in \{1, \dots, n\}} \text{dist}(a, X \setminus \{x_{(i)}\}) \right)
$$
where $ \text{dist}(a, X \setminus \{x_{(i)}\}) $ is the minimal travel distance to visit all checkpoints except $ x_{(i)} $, in optimal order.