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

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

a.append(10**10)

cnt=0

for i in range(n):

  fir=a[i]

  if a[i]+t>a[i+1]:

    las=a[i+1]

  else:

    las=a[i]+t

  cnt+=las-fir

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

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

a.append(10**10)

cnt=0

for i in range(n):

  if a[i]+t>a[i+1]:

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

  else:

    cnt+=t

print(cnt)
n, t = list(map(int, input().split()))
a = list(map(int, input().split()))
a.append(10**10)
cnt = 0
for i in range(n):
    fir = a[i]
    if a[i] + t > a[i + 1]:
        las = a[i + 1]
    else:
        las = a[i] + t
    cnt += las - fir
print(cnt)

n, t = list(map(int, input().split()))
a = list(map(int, input().split()))
a.append(10**10)
cnt = 0
for i in range(n):
    if a[i] + t > a[i + 1]:
        cnt += a[i + 1] - a[i]
    else:
        cnt += t
print(cnt)

-    fir = a[i] -        las = a[i + 1] +        cnt += a[i + 1] - a[i] -        las = a[i] + t -    cnt += las - fir +        cnt += t