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

L = list(map(int,input().split()))

ans = 0

for i in range(len(L)) :

    if i != N-1 :

        if L[i+1]-L[i] > T :

            ans += T

        else :

            ans += L[i+1]-L[i]

    else :

        ans += T

print(ans)

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

L = list(map(int,input().split()))

ans = T

for i in range(N-1) :

    ans += min(L[i+1]-L[i],T)

print(ans)

N, T = list(map(int, input().split()))
L = list(map(int, input().split()))
ans = 0
for i in range(len(L)):
    if i != N - 1:
        if L[i + 1] - L[i] > T:
            ans += T
        else:
            ans += L[i + 1] - L[i]
    else:
        ans += T
print(ans)

N, T = list(map(int, input().split()))
L = list(map(int, input().split()))
ans = T
for i in range(N - 1):
    ans += min(L[i + 1] - L[i], T)
print(ans)

-ans = 0 -for i in range(len(L)): -    if i != N - 1: -        if L[i + 1] - L[i] > T: -            ans += T -        else: -            ans += L[i + 1] - L[i] -    else: -        ans += T +ans = T +for i in range(N - 1): +    ans += min(L[i + 1] - L[i], T)