@staticmethod
def b():
    (n, t, *a) = map(int, sys.stdin.read().split())
    a = np.array(a)
    print((np.minimum((a[1:] - a[:(- 1)]), t).sum() + t))
@staticmethod
def b():
    (n, t, *a) = map(int, sys.stdin.read().split())
    a = np.array(a)
    print((np.minimum((a[1:] - a[:(- 1)]), t).sum() + t))