n, k = map(int, input().split()) d = list(map(int, input().split())) ans = k+1 for i in range(1, n): ans += min(d[i]-d[i-1], k+1) print(ans)