N, T = list(map(int, input().split()))

t_List = [int(x) for x in input().split()]

pre = 0

ans = T

for t in t_List:

    if t - pre <= T:

        ans += t - pre

    else:

        ans += T

    pre = t

print(ans)
N, T, *t = list(map(int, open(0).read().split()))

ans = sum(y-x if y-x < T else T for x,y in zip(t[:N-1],t[1:])) + T

print(ans)
N, T = list(map(int, input().split()))
t_List = [int(x) for x in input().split()]
pre = 0
ans = T
for t in t_List:
    if t - pre <= T:
        ans += t - pre
    else:
        ans += T
    pre = t
print(ans)

N, T, *t = list(map(int, open(0).read().split()))
ans = sum(y - x if y - x < T else T for x, y in zip(t[: N - 1], t[1:])) + T
print(ans)

-N, T = list(map(int, input().split())) -t_List = [int(x) for x in input().split()] -pre = 0 -ans = T -for t in t_List: -    if t - pre <= T: -        ans += t - pre -    else: -        ans += T -    pre = t +N, T, *t = list(map(int, open(0).read().split())) +ans = sum(y - x if y - x < T else T for x, y in zip(t[: N - 1], t[1:])) + T