#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define input for(i=1;i<=n;i++)cin>>a[i];

int main()
{
   ll n,t,i,x=0,ans=0;
   cin>>n>>t;
   ll a[n+5];
   ans+=t;
   input;
   for(i=1;i<n;i++)
   {
     x=a[i+1]-a[i];
     if(x>=t)ans+=t;
     else ans+=x;
   }
   cout<<ans<<endl;
}
