#atabc443c. Chokutter Addiction

Chokutter Addiction

题目描述

AtCoder Inc. starts work at time 0 0 and ends work at time T T . The interval between time t t and time t+1 t+1 is 1 1 second.
Takahashi-kun views the SNS chokutter during AtCoder Inc.'s business hours according to the following rules:

  • He opens chokutter at the same time as work starts.
  • If chokutter is open at the moment Aoki-kun passes behind Takahashi-kun's desk, he immediately closes it.
  • If Takahashi-kun closes chokutter at time t t , he always opens it at time t+100 t+100 .

From the start to the end of work, Aoki-kun passed behind Takahashi-kun's desk N N times, with the i i -th time being at time Ai A_i .
From the start to the end of work, for how many seconds in total was Takahashi-kun viewing chokutter?
Aoki-kun never passed behind the desk at the moment when Takahashi-kun opened chokutter.

输入格式

The input is given from Standard Input in the following format:

N N T T A1 A_1 A2 A_2 \dots AN A_N

输出格式

Output the answer.

输入输出样例 #1

输入 #1

5 700
100 150 300 350 700

输出 #1

500

输入输出样例 #2

输入 #2

0 1000000000

输出 #2

1000000000

输入输出样例 #3

输入 #3

10 1234
395 424 588 745 773 863 910 958 1102 1195

输出 #3

734

说明/提示

Sample Explanation 1

  • At time 0 0 , Takahashi-kun opens chokutter.
  • At time 100 100 , Aoki-kun passes behind Takahashi-kun's desk, and Takahashi-kun immediately closes chokutter.
  • At time 150 150 , Aoki-kun passes behind Takahashi-kun's desk, but Takahashi-kun does not have chokutter open at this time.
  • At time 200 200 , Takahashi-kun opens chokutter again.
  • At time 300 300 , Aoki-kun passes behind Takahashi-kun's desk, and Takahashi-kun immediately closes chokutter.
  • At time 350 350 , Aoki-kun passes behind Takahashi-kun's desk, but Takahashi-kun does not have chokutter open at this time.
  • At time 400 400 , Takahashi-kun opens chokutter again.
  • At time 700 700 , Aoki-kun passes behind Takahashi-kun's desk, and Takahashi-kun immediately closes chokutter.

Takahashi-kun was viewing chokutter for a total of 500 500 seconds.

Sample Explanation 2

There may be cases where Aoki-kun never passes behind Takahashi-kun's desk.

Constraints

  • All input values are integers.
  • 0N3×105 0 \le N \le 3 \times 10^5
  • 1A1<A2<<ANT109 1 \le A_1 < A_2 < \dots < A_N \le T \le 10^9
  • Aoki-kun never passes behind the desk at the moment when Takahashi-kun opens chokutter.