#include<stdio.h>
#define min(p,q)((p)<(q)?(p):(q))

int a[200010];
int main(){
	int n,t;
	scanf("%d%d",&n,&t);
	for(int i=0;i<n;i++)scanf("%d",a+i);
	int ans=0;
	for(int i=0;i<n-1;i++)ans+=min(a[i+1]-a[i],t);
	printf("%d",ans+t);
}
