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

a = [int(i) for i in input().split()]

ans = t

for i in range(1,n):

  if a[i]-a[i-1] < t:

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

  else:

    ans += t

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

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

ans = 0

for i in range(n-1):

    ans += min(time[i+1]-time[i],t)

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

n, t = list(map(int, input().split()))
time = list(map(int, input().split()))
ans = 0
for i in range(n - 1):
    ans += min(time[i + 1] - time[i], t)
print((ans + t))

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