#OLD143. travel1

travel1

Description

AA wants to go to a destination B, B is a distance of x units from his home, home to B is only one way, there are n hotels on the road can provide accommodation, each hotel to his house distance is represented by an array a[1 --n] ,The value of the array is from small to large, representing the distance from each hotel to his home. AA must travel m units in a fixed direction every day. When AA walks m units, the sky is dark. At this time, AA needs to find a hotel or take a few steps to get to the destination.If AA go to hotel , he can go to a previous hotel or go to the next hotel to accommodation. If the number of unit taken by AA on this day is greater than m, then additional costs will be incurred. The calculation of this additional cost is the absolute value of (the total unit distance taken this day - m). If AA go through the m units this day,He just happens to be in the hotel,and he wants to stay in this hotel, there is no extra cost on this day.

Format

Input

Input contains multiple test cases.The first line gives two positive integers n and m, where n represents the number of hotels between home and destination B, m represents that AA must travel m units in a fixed direction every day, and the next line has n+1 numbers, first n numbers are a[1--n] and the last number is x, a[1--n] array represents the distance from each hotel to the AA home, and x represents the distance from the destination to the AA home. (0<=n<=1000).(0<=m, a[1--n]<=x<=1000).

Output

For each test case,output the total of the minimum extra cost incurred when AA arrives at destination B.

Samples

2 10
10 21 30
2

Hint