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

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



ans = 0



for i in range(1, N):

    if t[i]-t[i-1] <= T:

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

    else:

        ans += T

print((ans+T))

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

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

print((T+sum(min(T, t[i]-t[i-1]) for i in range(1, N))))

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

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

-ans = 0 -for i in range(1, N): -    if t[i] - t[i - 1] <= T: -        ans += t[i] - t[i - 1] -    else: -        ans += T -print((ans + T)) +print((T + sum(min(T, t[i] - t[i - 1]) for i in range(1, N))))