#include <iostream>
#include <algorithm>

using namespace std;

void solve() {
    int n;
    long long t1, t2, ans, t;
    ans = 0;
    cin >> n >> t;
    cin >> t1;
    t1 = t2 = 0;
    for (int i=1;i<n; ++i) {
        cin >> t1;
        ans += min(t1 - t2, t);
        t2 = t1;
    }
    ans += t;
    cout << ans;

}

int main() {

    solve();
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define rep(i, n) FOR(i, 0, n)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; --i)
#define whole(x) (x).begin(),(x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
using P = pair<int, int>;
#define debug(var) cerr << "[" << #var << "] " << var << endl
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
const ll mod = 1000000007;
const int dx[] = {-1,0,1,0};
const int dy[] = {0,-1,0,1};


int main(){
    ll n, T;
    cin >> n >> T;
    vector<ll> t(n);
    rep(i, n) cin >> t[i];
    ll ans = T*n;
    rep(i, n-1) {
        ans -= max(0LL, t[i]+T-t[i+1]);
    }
    
    cout << ans << endl;
    return 0;
}
