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

TL = [-T] + list(map(int, input().split()))



answer = 0

for i in range(1, N+1):

    answer += T

    answer -= max(0, TL[i-1] + T - TL[i])

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

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



answer = T

for i in range(N-1):

    answer += min(TL[i+1] - TL[i], T)

print(answer)
N, T = list(map(int, input().split()))
TL = [-T] + list(map(int, input().split()))
answer = 0
for i in range(1, N + 1):
    answer += T
    answer -= max(0, TL[i - 1] + T - TL[i])
print(answer)

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

-TL = [-T] + list(map(int, input().split())) -answer = 0 -for i in range(1, N + 1): -    answer += T -    answer -= max(0, TL[i - 1] + T - TL[i]) +TL = list(map(int, input().split())) +answer = T +for i in range(N - 1): +    answer += min(TL[i + 1] - TL[i], T)