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

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

ans = T

for i in range(1,N):

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

    ans += T

  else:

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

  

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

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

ans = N * T # 総和

cur = 0 # いつまで出るか

for i in range(N):

    if cur > t[i]:

        ans -= cur - t[i]

    cur = t[i] + T

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

N, T = list(map(int, input().split()))
t = list(map(int, input().split()))
ans = N * T  # 総和
cur = 0  # いつまで出るか
for i in range(N):
    if cur > t[i]:
        ans -= cur - t[i]
    cur = t[i] + T
print(ans)

-ans = T -for i in range(1, N): -    if t[i] - t[i - 1] >= T: -        ans += T -    else: -        ans += t[i] - t[i - 1] +ans = N * T  # 総和 +cur = 0  # いつまで出るか +for i in range(N): +    if cur > t[i]: +        ans -= cur - t[i] +    cur = t[i] + T