#include<bits/stdc++.h>

using namespace std;
const int inf = 1e9+7;

int main()
{
    int n,t;
    while(~scanf("%d%d",&n,&t)){
        int ans = 0,last = -inf;
        for(int i=0;i<n;++i){
            int u; scanf("%d",&u);
            if(u > last + t) ans += t;
            else ans += u - last;
            last = u;
        }
        printf("%d\n",ans);
    }
    return 0;
}
