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

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

time = 0



for i in range(N-1):

  if t[i + 1] - t[i] >= T:

    time += T

  else:

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

 

time += T

print(time)

  

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

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

ans = 0



for i in range(N - 1):

  nn = tt[i + 1] - tt[i]

  if nn > T:

    ans += T

  else:

    ans += nn

    

ans += T

print(ans)

    

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

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

-t = list(map(int, input().split())) -time = 0 +tt = list(map(int, input().split())) +ans = 0 -    if t[i + 1] - t[i] >= T: -        time += T +    nn = tt[i + 1] - tt[i] +    if nn > T: +        ans += T -        time += t[i + 1] - t[i] -time += T -print(time) +        ans += nn +ans += T +print(ans)