#include<iostream>
#include<algorithm>
using LL = long long;
LL N,T;
LL t,x;
int main() {
	std::cin >> N >> T;
	for (int i = 0; i < N; i++) {
		LL a;
		std::cin>> a;
		x += std::min(T, a - t);
		t = a;
	}
	std::cout << x+T << std::endl;
	return 0;
}