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

prev = 0

ans = 0

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

for t in tt:

  if prev+T <= t:

    ans += T

  else:

    ans += (t - prev)

  prev = t



print((ans + T))

    

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

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



ans = 0

end = -1

start = -1

for x in t:

    if end < x:

        ans += (end - start)

        start = x

        end = x + T

    else:

        end = x + T



ans += (end - start)



print(ans)

N, T = list(map(int, input().split()))
prev = 0
ans = 0
tt = list(map(int, input().split()))
for t in tt:
    if prev + T <= t:
        ans += T
    else:
        ans += t - prev
    prev = t
print((ans + T))

N, T = list(map(int, input().split()))
t = list(map(int, input().split()))
ans = 0
end = -1
start = -1
for x in t:
    if end < x:
        ans += end - start
        start = x
        end = x + T
    else:
        end = x + T
ans += end - start
print(ans)

-prev = 0 +t = list(map(int, input().split())) -tt = list(map(int, input().split())) -for t in tt: -    if prev + T <= t: -        ans += T +end = -1 +start = -1 +for x in t: +    if end < x: +        ans += end - start +        start = x +        end = x + T -        ans += t - prev -    prev = t -print((ans + T)) +        end = x + T +ans += end - start +print(ans)