You are playing a rhythm game. In this level, there are $n$ notes falling from the top of the screen, and you need to hit them on a line at the bottom of the screen.
The judgment line can be viewed as the positive half-axis of a number line. The $n$ notes fall in sequence, with the $i$-th note falling at position $p_i$. Your two hands can each cover an interval of length $L$. Specifically, a hand can cover $[x, x+L]$, allowing you to hit any note that falls within this interval (inclusive of the endpoints).
At the start of the game, your two hands cover $[0, L]$ and $[0, L]$. In the intervals between the falling of the $n$ notes, you can move your hands arbitrarily. The time taken for movement is negligible, and moving a hand from $[x, x+L]$ to $[y, y+L]$ consumes $|x-y|$ stamina.
Before the game starts, you want to know the minimum total stamina required to hit all the notes in sequence.
Input
The first line contains two integers $n$ and $L$.
The second line contains $n$ integers, where the $i$-th integer $p_i$ represents the position of the $i$-th note.
Output
A single integer representing the minimum stamina consumed.
Examples
Input 1
4 1
6 3 7 1
Output 1
9
Note
The movements of the two hands are: $[0,1] \to [5,6] \to [6,7]$ and $[0,1] \to [2,3] \to [1,2]$, consuming $6+3=9$ stamina.
Input 2/3
See the provided files ex_game2/3.in.
Output 2/3
See the provided files ex_game2/3.out.
Constraints
For $100\%$ of the data, $1 \le n \le 50000$, $0 \le L \le 50$, $0 \le p_i \le 10^9$.
Please note that the third sample test case (Extra Test #3) does not satisfy the $L \le 50$ constraint; its $L$ value is 68.
$subtask1(15\%): n \le 200, p_i \le 200$
$subtask2(15\%): L = 0$
$subtask3(30\%): L \le 5$
$subtask4(40\%):$ No special constraints.