#include<cstdio>
#include<cstring>
#include<iostream>
using namespace std;
typedef long long LL;
int main(){
	LL n,T;
	cin>>n>>T;
	LL t,temp;
	cin>>t;
	temp=t;
	LL sum=n*T;
	for(int i=1;i<n;i++){
		cin>>t;
		t=t-temp;
		temp=temp+t;
		if(t<T) sum-=T-t;
	}
	printf("%lld\n",sum);
return 0;
}
