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

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

ans = 0

x_ = 0

for x in T:

    if x-x_ >= t:

        ans += t

    else:

        ans += x-x_

    x_ = x

ans += t

print(ans)

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

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



ans = 0

Y = []

for i in range(n-1):

    Y.append(X[i+1]-X[i])



ans = 0

for y in Y:

    ans += min(T, y)

ans += T

print(ans)

n, t = list(map(int, input().split()))
T = list(map(int, input().split()))
ans = 0
x_ = 0
for x in T:
    if x - x_ >= t:
        ans += t
    else:
        ans += x - x_
    x_ = x
ans += t
print(ans)

n, T = list(map(int, input().split()))
X = list(map(int, input().split()))
ans = 0
Y = []
for i in range(n - 1):
    Y.append(X[i + 1] - X[i])
ans = 0
for y in Y:
    ans += min(T, y)
ans += T
print(ans)

-n, t = list(map(int, input().split())) -T = list(map(int, input().split())) +n, T = list(map(int, input().split())) +X = list(map(int, input().split())) -x_ = 0 -for x in T: -    if x - x_ >= t: -        ans += t -    else: -        ans += x - x_ -    x_ = x -ans += t +Y = [] +for i in range(n - 1): +    Y.append(X[i + 1] - X[i]) +ans = 0 +for y in Y: +    ans += min(T, y) +ans += T