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

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



ans = 0

until = 0

for t in ts:

    ans += min(T, t+T-until)

    until = t+T

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

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



ans = 0

prev = ts[0]

for t in ts[1:]:

    ans += min(T, t-prev)

    prev = t

ans += T

print(ans)
N, T = list(map(int, input().split()))
ts = list(map(int, input().split()))
ans = 0
until = 0
for t in ts:
    ans += min(T, t + T - until)
    until = t + T
print(ans)

N, T = list(map(int, input().split()))
ts = list(map(int, input().split()))
ans = 0
prev = ts[0]
for t in ts[1:]:
    ans += min(T, t - prev)
    prev = t
ans += T
print(ans)

-until = 0 -for t in ts: -    ans += min(T, t + T - until) -    until = t + T +prev = ts[0] +for t in ts[1:]: +    ans += min(T, t - prev) +    prev = t +ans += T