#D3920. Delivery to a Luxurious House

    ID: 3259 Type: Default 8000ms 536MiB

Delivery to a Luxurious House

Delivery to a Luxurious House

B-Mansion and courier

Problem Statement

Taro lives alone in a mansion. Taro, who loves studying, intends to study in his study in the house today. Taro can't concentrate outside the study, so he always studies in the study.

However, on this day, N N of courier service to Taro arrived. i i (1 leqi leqN 1 \ leq i \ leq N ) The arrival time of the third courier is ai a_i . It is painful to have the delivery person wait at the front door, so Taro decided to be at the front door by the time the courier arrives. Due to the large size of the mansion, it takes M M one way to move between the study and the entrance.

On the other hand, Taro wants to study for as long as possible. Find the maximum amount of time Taro can study in the study from time 0 0 to time T T .

Taro is in the study at time 0 0 , and the courier does not arrive earlier than the time M M , and the courier does not arrive later than the time T T . Also, the time it takes for Taro to receive the courier can be ignored.

Input

Each dataset consists of two lines. The first line consists of three integers N,M,T N, M, T separated by blanks. These integers satisfy 1 leqN leq100 1 \ leq N \ leq 100 , 1 leqM leq10,000 1 \ leq M \ leq 10 {,} 000 , 1 leqT leq10,000 1 \ leq T \ leq 10 {,} 000 . The second line consists of N N integers a1,a2, dots,aN a_1, a_2, \ dots, a_N separated by blanks. Each ai a_i fills M leqai leqT M \ leq a_i \ leq T and is also ai<ai+1 a_i <a_ {i + 1} (1 leqi<N 1 \ leq i <N ).

Output

Output an integer representing the maximum amount of time Taro can study on one line.

Sample Input 1

1 1 5 3

Output for the Sample Input 1

3

Sample Input 2

2 1 10 2 7

Output for the Sample Input 2

6

Sample Input 3

2 4 10 6 8

Output for the Sample Input 3

2

Example

Input

1 1 5 3

Output

3

inputFormat

Input

Each dataset consists of two lines. The first line consists of three integers N,M,T N, M, T separated by blanks. These integers satisfy 1 leqN leq100 1 \ leq N \ leq 100 , 1 leqM leq10,000 1 \ leq M \ leq 10 {,} 000 , 1 leqT leq10,000 1 \ leq T \ leq 10 {,} 000 . The second line consists of N N integers a1,a2, dots,aN a_1, a_2, \ dots, a_N separated by blanks. Each ai a_i fills M leqai leqT M \ leq a_i \ leq T and is also ai<ai+1 a_i <a_ {i + 1} (1 leqi<N 1 \ leq i <N ).

outputFormat

Output

Output an integer representing the maximum amount of time Taro can study on one line.

Sample Input 1

1 1 5 3

Output for the Sample Input 1

3

Sample Input 2

2 1 10 2 7

Output for the Sample Input 2

6

Sample Input 3

2 4 10 6 8

Output for the Sample Input 3

2

Example

Input

1 1 5 3

Output

3

样例

1 1 5
3
3