#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<map>
#include<iostream>
#include<algorithm>
using namespace std; 
int n,t;
int a[200005];

int main()
{
	cin>>n>>t;
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];
	}
	int ans=t;
	for(int i=2;i<=n;i++)
	{
		int temp;
		temp=a[i]-a[i-1];
		if(temp>=t)
		   ans+=t;
		else
		   ans+=temp;
	}
	cout<<ans<<endl;
	return 0;
}