#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
    int n;
    cin >> n;
    ll T;
    cin >> T;
    ll t, tb = 0;
    ll ans = 0;
    for(int i = 0; i < n; i++){
        cin >> t;
        ans += min(T, t-tb);
        tb = t;
    }
    ans += T;
    cout << ans << endl;
}