# coding: utf-8

# Your code here!



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

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

total_t, crrnt_t, a_len = 0, 0, len(a)



for i in range(a_len - 1):

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

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

    else: 

        total_t += T

    crrnt_t = a[i + 1]



print((total_t + T))
# coding: utf-8

# Your code here!



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

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

total_t, a_len = 0, len(a)



for i in range(a_len - 1):

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

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

    else: 

        total_t += T



print((total_t + T))
# coding: utf-8
# Your code here!
N, T = list(map(int, input().split()))
a = list(map(int, input().split()))
total_t, crrnt_t, a_len = 0, 0, len(a)
for i in range(a_len - 1):
    if a[i] + T > a[i + 1]:
        total_t += a[i + 1] - a[i]
    else:
        total_t += T
    crrnt_t = a[i + 1]
print((total_t + T))

# coding: utf-8
# Your code here!
N, T = list(map(int, input().split()))
a = list(map(int, input().split()))
total_t, a_len = 0, len(a)
for i in range(a_len - 1):
    if a[i] + T > a[i + 1]:
        total_t += a[i + 1] - a[i]
    else:
        total_t += T
print((total_t + T))

-total_t, crrnt_t, a_len = 0, 0, len(a) +total_t, a_len = 0, len(a) -    crrnt_t = a[i + 1]