#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main() {
	int n, t; cin >> n >> t;
	vector<int>tn(n);
	for (auto&& x : tn)cin >> x;

	int ans = t;
	for (int i = 0; i < n - 1; i++) {
		ans += min(t, tn[i + 1] - tn[i]);
	}
	cout << ans << endl;

	return 0;
}